Sha256: 60c80121856ec3a1c9b7e8a35e1d5c02209b257b650d13d7717204d9f020592c
Contents?: true
Size: 376 Bytes
Versions: 20
Compression:
Stored size: 376 Bytes
Contents
class ProtectedParams < ActiveSupport::HashWithIndifferentAccess attr_accessor :permitted alias :permitted? :permitted def initialize(attributes) super(attributes) @permitted = false end def permit! @permitted = true self end def dup super.tap do |duplicate| duplicate.instance_variable_set :@permitted, @permitted end end end
Version data entries
20 entries across 20 versions & 1 rubygems