diff options
author | Genadi Samokovarov <gsamokovarov@gmail.com> | 2017-05-31 12:16:20 +0300 |
---|---|---|
committer | Genadi Samokovarov <gsamokovarov@gmail.com> | 2017-06-03 13:52:48 +0300 |
commit | b6b0c99ff3e8ace3f42813154dbe4b8ad6a98e6c (patch) | |
tree | 5d2f9250f66f675280c2761daa52880b28d6a86e /actionpack/lib/action_controller/metal | |
parent | a5b0c60714e1e8d8c182af830a26e1c7c884271d (diff) | |
download | rails-b6b0c99ff3e8ace3f42813154dbe4b8ad6a98e6c.tar.gz rails-b6b0c99ff3e8ace3f42813154dbe4b8ad6a98e6c.tar.bz2 rails-b6b0c99ff3e8ace3f42813154dbe4b8ad6a98e6c.zip |
Use mattr_accessor default: option throughout the project
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r-- | actionpack/lib/action_controller/metal/strong_parameters.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb index 20330b5091..cd99e3125f 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -119,8 +119,7 @@ module ActionController # params[:key] # => "value" # params["key"] # => "value" class Parameters - cattr_accessor :permit_all_parameters, instance_accessor: false - self.permit_all_parameters = false + cattr_accessor :permit_all_parameters, instance_accessor: false, default: false cattr_accessor :action_on_unpermitted_parameters, instance_accessor: false @@ -205,8 +204,7 @@ module ActionController # config. For instance: # # config.always_permitted_parameters = %w( controller action format ) - cattr_accessor :always_permitted_parameters - self.always_permitted_parameters = %w( controller action ) + cattr_accessor :always_permitted_parameters, default: %w( controller action ) # Returns a new instance of <tt>ActionController::Parameters</tt>. # Also, sets the +permitted+ attribute to the default value of |