Rails 5.2 adds default option to module and class attribute accessors
Rails 5.2 now supports specifying a default value using default option for the module and class macros like mattr_accessor, mattr_reader, mattr_writer, cattr_accessor, cattr_reader, and cattr_writer respectively. Read more about it here.
Post a comment