Sha256: a0f3e384be6195dec4a2015777e2c848de5013604f6f52c1d0c9954bca71e866

Contents?: true

Size: 789 Bytes

Versions: 33

Compression:

Stored size: 789 Bytes

Contents

require 'active_support/concern'

module Protobuf
  module ActiveRecord
    module MassAssignmentSecurity
      module Transformation
        extend ::ActiveSupport::Concern

        module ClassMethods
          # Filters protected attributes from the available attributes list. When
          # set through accessible attributes, returns the accessible attributes.
          # When set through protected attributes, returns the attributes minus any
          # protected attributes.
          #
          # :nodoc:
          def _filtered_attributes
            if accessible_attributes.present?
              accessible_attributes.to_a
            else
              self.attribute_names - protected_attributes.to_a
            end
          end
        end
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
protobuf-activerecord-3.6.0 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.5.1 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.5.0 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.4.4 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.4.4.pre lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.4.3 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.4.2 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.4.1 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.4.0 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.3.8 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.3.7 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.3.6 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.3.5 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.3.4 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.3.3 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.3.2 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.3.1 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.3.0 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.2.2 lib/protobuf/active_record/mass_assignment_security/transformation.rb
protobuf-activerecord-3.2.1 lib/protobuf/active_record/mass_assignment_security/transformation.rb