Skip to content
  • Diego Toral's avatar
    99525cb6
    ActiveSupport::Configurable default value option · 99525cb6
    Diego Toral authored
    Sometimes it can be very strange or long have to define default values
    for config accessors as blocks, specially when config is a simple value
    like 1, true, :symbol. This commit adds the ability to specify those
    values by just passing a ` default` option when defining the accessor.
    
    It also makes config accessor's interface similar to other Rails
    methods like `class_attribute`, which also has the instance_reader,
    instance_writer and instance_accessor options.
    99525cb6
    ActiveSupport::Configurable default value option
    Diego Toral authored
    Sometimes it can be very strange or long have to define default values
    for config accessors as blocks, specially when config is a simple value
    like 1, true, :symbol. This commit adds the ability to specify those
    values by just passing a ` default` option when defining the accessor.
    
    It also makes config accessor's interface similar to other Rails
    methods like `class_attribute`, which also has the instance_reader,
    instance_writer and instance_accessor options.
Loading