Added strong_parameters gem to Gemfile and created an initializer in config
This commit is contained in:
parent
0e26a496b8
commit
143a970e61
3 changed files with 7 additions and 1 deletions
5
Gemfile
5
Gemfile
|
|
@ -65,6 +65,11 @@ gem 'redcarpet', '3.0.0'
|
|||
gem 'roxml', '3.1.6'
|
||||
gem 'ruby-oembed', '0.8.8'
|
||||
|
||||
|
||||
#Rails 4 integration
|
||||
gem 'strong_parameters'
|
||||
|
||||
|
||||
# Services
|
||||
|
||||
gem 'omniauth', '1.1.4'
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ module Diaspora
|
|||
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
||||
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
||||
# parameters by using an attr_accessible or attr_protected declaration.
|
||||
#config.active_record.whitelist_attributes = true
|
||||
#config.active_record.whitelist_attributes = false
|
||||
|
||||
# Enable the asset pipeline
|
||||
config.assets.enabled = true
|
||||
|
|
|
|||
1
config/initializers/strong_parameters.rb
Normal file
1
config/initializers/strong_parameters.rb
Normal file
|
|
@ -0,0 +1 @@
|
|||
ActiveRecord::Base.send(:include, ActiveModel::ForbiddenAttributesProtection)
|
||||
Loading…
Reference in a new issue