diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-06-05 10:50:48 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-06-05 10:50:48 -0500 |
commit | 5e1d40f7734dd65b52e45547284385c405347e2c (patch) | |
tree | 3386464d8ebb753f3586c9b73f4f60cffec4271c /activesupport/CHANGELOG.md | |
parent | 8359a2f98156d9a870536c75d1a5c6f3fab6fb96 (diff) | |
download | rails-5e1d40f7734dd65b52e45547284385c405347e2c.tar.gz rails-5e1d40f7734dd65b52e45547284385c405347e2c.tar.bz2 rails-5e1d40f7734dd65b52e45547284385c405347e2c.zip |
add instance_accessor option to ActiveSupport::Configurable#config_accessor
Changes:
* Add `instance_accessor` option to opt out of the instance writer and
instance reader methods.
* Raises a NameError if the name of the attribute is not valid.
* Update documentation and tests.
* Add CHANGELOG entry in activesupport.
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r-- | activesupport/CHANGELOG.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index af9e8c27c7..c778647ea5 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,5 +1,17 @@ ## Rails 4.0.0 (unreleased) ## +* Add `:instance_accessor` option for `config_accessor`. + + class User + include ActiveSupport::Configurable + config_accessor :allowed_access, instance_accessor: false + end + + User.new.allowed_access = true # => NoMethodError + User.new.allowed_access # => NoMethodError + + *Francesco Rodriguez* + * ActionView::Helpers::NumberHelper methods have been moved to ActiveSupport::NumberHelper and are now available via Numeric#to_s. Numeric#to_s now accepts the formatting options :phone, :currency, :percentage, :delimited, :rounded, :human, and :human_size. *Andrew Mutz* |