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.1.2 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.1.1 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.1.0 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.0.1 lib/couch_potato/forbidden_attributes_protection.rb
couch_potato-1.0.0 lib/couch_potato/forbidden_attributes_protection.rb