Class: ActsAsTaggableOnDynamic::DynamicMassAssignmentAuthorizer

Inherits:
Object
  • Object
show all
Defined in:
lib/acts_as_taggable_on_dynamic/dynamic_mass_assignment_authorizer.rb

Instance Method Summary collapse

Constructor Details

#initialize(model, orgAuthorizer) ⇒ DynamicMassAssignmentAuthorizer

Returns a new instance of DynamicMassAssignmentAuthorizer.



3
4
5
6
# File 'lib/acts_as_taggable_on_dynamic/dynamic_mass_assignment_authorizer.rb', line 3

def initialize(model, orgAuthorizer)
  @model = model
  @orgAuthorizer = orgAuthorizer
end

Instance Method Details

#deny?(key) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
14
# File 'lib/acts_as_taggable_on_dynamic/dynamic_mass_assignment_authorizer.rb', line 8

def deny?(key)
  if (@model.dynamic_tag_context_attribute?(key) || @model.tag_list_attribute?(key))
    false
  else
    @orgAuthorizer.deny?(key)
  end
end