Sha256: 703e512b7563c58e50152b51e7725a51d075fbdddb2deb45d44ca8ffde9f9b8b

Contents?: true

Size: 478 Bytes

Versions: 10

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

class Combustion::Configurations::ActiveRecord
  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
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
combustion-1.3.1 lib/combustion/configurations/active_record.rb
combustion-1.3.0 lib/combustion/configurations/active_record.rb
combustion-1.2.0 lib/combustion/configurations/active_record.rb
combustion-1.1.2 lib/combustion/configurations/active_record.rb
combustion-1.1.1 lib/combustion/configurations/active_record.rb
combustion-1.1.0 lib/combustion/configurations/active_record.rb
combustion-1.0.0 lib/combustion/configurations/active_record.rb
combustion-0.9.1 lib/combustion/configurations/active_record.rb
combustion-0.9.0 lib/combustion/configurations/active_record.rb
combustion-0.8.0 lib/combustion/configurations/active_record.rb