Class: Combustion::Configurations::ActiveRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/combustion/configurations/active_record.rb

Class Method Summary collapse

Class Method Details

.call(config) ⇒ Object


4
5
6
7
8
9
10
11
12
# File 'lib/combustion/configurations/active_record.rb', line 4

def self.call(config)
  return unless defined?(ActiveRecord::Railtie)
  return unless ::ActiveRecord.constants.include?(:MassAssignmentSecurity)

  # Turn on ActiveRecord attribute whitelisting
  # This way the dummy app matches new rails apps re: this setting
  config.active_record.whitelist_attributes      = true
  config.active_record.mass_assignment_sanitizer = :strict
end