Avoid deprecation warning about whitelist_attributes in rails 4

This commit is contained in:
Neil Lalonde 2013-11-05 15:47:43 -05:00
parent 18bc6ecd08
commit adba0c2996
1 changed files with 5 additions and 4 deletions

View File

@ -128,10 +128,11 @@ module Discourse
config.ember.ember_location = "#{Rails.root}/vendor/assets/javascripts/production/ember.js"
config.ember.handlebars_location = "#{Rails.root}/vendor/assets/javascripts/handlebars.js"
# Since we are using strong_parameters, we can disable and remove
# attr_accessible.
config.active_record.whitelist_attributes = false
unless rails4?
# Since we are using strong_parameters, we can disable and remove
# attr_accessible.
config.active_record.whitelist_attributes = false
end
require 'plugin'
require 'auth'