Sha256: ccff3874af2f2a3dce188599f6f408dab7cc43ca00156526c868c6c02a594dfd

Contents?: true

Size: 388 Bytes

Versions: 25

Compression:

Stored size: 388 Bytes

Contents

module CouchPotato
  module ForbiddenAttributesProtection
    def self.included(base)
      base.class_eval do
        if defined?(ActiveModel::ForbiddenAttributesProtection)
          include ActiveModel::ForbiddenAttributesProtection

          def attributes=(attributes)
            super sanitize_for_mass_assignment(attributes)
          end
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
couch_potato-1.17.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.16.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.15.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.14.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.13.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.12.1 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.12.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.11.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.10.1 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.10.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.9.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.7.1 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.7.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.6.5 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.6.4 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.6.3 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.4.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.3.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.2.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.1.4 lib/couch_potato/forbidden_attributes_protection.rb