Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up config_accessor with a default value by block #7645

Merged
merged 1 commit into from
Sep 17, 2012

Commits on Sep 17, 2012

  1. set up config_accessor with a default value by block

    * ActiveSupport::Configurable should allow config_accessor to take
      default value by block, just like cattr_accessor.
    
        class User
          include ActiveSupport::Configurable
          config_accessor :hair_colors do
            [:brown, :black, :blonde, :red]
          end
        end
    
        User.hair_colors # => [:brown, :black, :blonde, :red]
    
    * remove trailing whitespaces in configurable.rb and its test file.
    
    * Update ActiveSupport CHANGELOG.
    larrylv committed Sep 17, 2012
    Configuration menu
    Copy the full SHA
    1efe30e View commit details
    Browse the repository at this point in the history