Sha256: 233fd7eb2748ca0e7abaf025b7a013aa5c3d5a5183c6bd7b0d4b494ac36f7d3c

Contents?: true

Size: 595 Bytes

Versions: 6

Compression:

Stored size: 595 Bytes

Contents

module MongoMapper
  module Plugins
    module StrongParameters
      extend ::ActiveSupport::Concern

      included do
        include ::ActiveModel::ForbiddenAttributesProtection
        class << self
          deprecate :attr_protected, :attr_accessible
        end
      end

      def attributes=(attrs = {})
        super sanitize_for_mass_assignment(attrs)
      end

      def update_attributes(attrs = {})
        super sanitize_for_mass_assignment(attrs)
      end

      def update_attributes!(attrs = {})
        super sanitize_for_mass_assignment(attrs)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mongo_mapper-0.15.6 lib/mongo_mapper/plugins/strong_parameters.rb
mongo_mapper-0.15.5 lib/mongo_mapper/plugins/strong_parameters.rb
mongo_mapper-0.15.4 lib/mongo_mapper/plugins/strong_parameters.rb
mongo_mapper-0.15.3 lib/mongo_mapper/plugins/strong_parameters.rb
mongo_mapper-0.15.2 lib/mongo_mapper/plugins/strong_parameters.rb
mongo_mapper-0.15.1 lib/mongo_mapper/plugins/strong_parameters.rb