diff options
author | Larry Lv <larrylv1990@gmail.com> | 2012-09-15 03:25:21 +0800 |
---|---|---|
committer | Larry Lv <larrylv1990@gmail.com> | 2012-09-17 09:14:21 +0800 |
commit | 1efe30ebcef2e6d3967742f9bcf4f6675a946d14 (patch) | |
tree | 3f667a6d1535e0dfee5009b9b368a0a5c3ea0e1c /activesupport/lib/active_support/ordered_hash.rb | |
parent | 82efe8943bf6ff12b597987506bf177d66609049 (diff) | |
download | rails-1efe30ebcef2e6d3967742f9bcf4f6675a946d14.tar.gz rails-1efe30ebcef2e6d3967742f9bcf4f6675a946d14.tar.bz2 rails-1efe30ebcef2e6d3967742f9bcf4f6675a946d14.zip |
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.
Diffstat (limited to 'activesupport/lib/active_support/ordered_hash.rb')
0 files changed, 0 insertions, 0 deletions