Sha256: 0814705f57d8c8b8d3f33f025077ba6022c3c107d87fb2007f309b4fdaab4109

Contents?: true

Size: 351 Bytes

Versions: 8

Compression:

Stored size: 351 Bytes

Contents

module Toy
  module MassAssignmentSecurity
    extend ActiveSupport::Concern
    include ActiveModel::MassAssignmentSecurity

    module InstanceMethods
      def attributes=(attrs, guard_protected_attributes=true)
        attrs = sanitize_for_mass_assignment(attrs || {}) if guard_protected_attributes
        super(attrs)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
toystore-0.8.3 lib/toy/mass_assignment_security.rb
toystore-0.8.2 lib/toy/mass_assignment_security.rb
toystore-0.8.1 lib/toy/mass_assignment_security.rb
toystore-0.8.0 lib/toy/mass_assignment_security.rb
toystore-0.7.0 lib/toy/mass_assignment_security.rb
toystore-0.6.6 lib/toy/mass_assignment_security.rb
toystore-0.6.5 lib/toy/mass_assignment_security.rb
toystore-0.6.4 lib/toy/mass_assignment_security.rb