diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-07-01 21:35:31 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-07-01 21:36:15 -0300 |
commit | 1144d5e4a1bab6520b0ff6ffa26e04aeabfb3bc7 (patch) | |
tree | ad1b3c275c10d4d45054c27f32e5b0a427065093 | |
parent | 5cba5530ac5df837c55e93c85a3548667f1a9f14 (diff) | |
download | rails-1144d5e4a1bab6520b0ff6ffa26e04aeabfb3bc7.tar.gz rails-1144d5e4a1bab6520b0ff6ffa26e04aeabfb3bc7.tar.bz2 rails-1144d5e4a1bab6520b0ff6ffa26e04aeabfb3bc7.zip |
Remove deprecation messages about protected_attributes and rails-observers
-rw-r--r-- | activerecord/lib/active_record/railtie.rb | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index 4b455594d4..269f9f975b 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -111,45 +111,6 @@ module ActiveRecord initializer "active_record.set_configs" do |app| ActiveSupport.on_load(:active_record) do - begin - old_behavior, ActiveSupport::Deprecation.behavior = ActiveSupport::Deprecation.behavior, :stderr - whitelist_attributes = app.config.active_record.delete(:whitelist_attributes) - - if respond_to?(:mass_assignment_sanitizer=) - mass_assignment_sanitizer = nil - else - mass_assignment_sanitizer = app.config.active_record.delete(:mass_assignment_sanitizer) - end - - unless whitelist_attributes.nil? && mass_assignment_sanitizer.nil? - ActiveSupport::Deprecation.warn <<-EOF.strip_heredoc, [] - Model based mass assignment security has been extracted - out of Rails into a gem. Please use the new recommended protection model for - params or add `protected_attributes` to your Gemfile to use the old one. - - To disable this message remove the `whitelist_attributes` option from your - `config/application.rb` file and any `mass_assignment_sanitizer` options - from your `config/environments/*.rb` files. - - See http://guides.rubyonrails.org/security.html#mass-assignment for more information. - EOF - end - - unless app.config.active_record.delete(:observers).nil? - ActiveSupport::Deprecation.warn <<-EOF.strip_heredoc, [] - Active Record Observers has been extracted out of Rails into a gem. - Please use callbacks or add `rails-observers` to your Gemfile to use observers. - - To disable this message remove the `observers` option from your - `config/application.rb` or from your initializers. - - See http://guides.rubyonrails.org/4_0_release_notes.html for more information. - EOF - end - ensure - ActiveSupport::Deprecation.behavior = old_behavior - end - app.config.active_record.each do |k,v| send "#{k}=", v end |