Class: ActiveFedora::Associations::AssociationScope

Inherits:
Object
  • Object
show all
Defined in:
lib/active_fedora/associations/association_scope.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(association) ⇒ AssociationScope


10
11
12
# File 'lib/active_fedora/associations/association_scope.rb', line 10

def initialize(association)
  @association = association
end

Instance Attribute Details

#associationObject (readonly)

Returns the value of attribute association


5
6
7
# File 'lib/active_fedora/associations/association_scope.rb', line 5

def association
  @association
end

Instance Method Details

#scopeObject


14
15
16
17
# File 'lib/active_fedora/associations/association_scope.rb', line 14

def scope
  scope = klass.unscoped
  add_constraints(scope)
end