Sha256: fa272fe3c375dbe2859915aab85ffac49f3d4c52df0fea13c4f7a91ea94b3415

Contents?: true

Size: 405 Bytes

Versions: 8

Compression:

Stored size: 405 Bytes

Contents

module Restly::Base::MassAssignmentSecurity
  extend ActiveSupport::Concern

  module ClassMethods

    def attr_accessible(*args)
      options = args.dup.extract_options!
      if options[:from_spec]
        before_initialize do
          self._accessible_attributes = spec[:actions].map { |action| action['parameters'] }.flatten
        end
      else
        super(*args)
      end
    end

  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
restly-0.0.1.alpha.9 lib/restly/base/mass_assignment_security.rb
restly-0.0.1.alpha.8 lib/restly/base/mass_assignment_security.rb
restly-0.0.1.alpha.7 lib/restly/base/mass_assignment_security.rb
restly-0.0.1.alpha.6 lib/restly/base/mass_assignment_security.rb
restly-0.0.1.alpha.4 lib/restly/base/mass_assignment_security.rb
restly-0.0.1.alpha.3 lib/restly/base/mass_assignment_security.rb
restly-0.0.1.alpha.2 lib/restly/base/mass_assignment_security.rb
restly-0.0.1.alpha.1 lib/restly/base/mass_assignment_security.rb