Class: ActiveFedora::Associations::AssociationScope
- Inherits:
-
Object
- Object
- ActiveFedora::Associations::AssociationScope
- Defined in:
- lib/active_fedora/associations/association_scope.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#association ⇒ Object
readonly
Returns the value of attribute association.
Instance Method Summary collapse
-
#initialize(association) ⇒ AssociationScope
constructor
A new instance of AssociationScope.
- #scope ⇒ Object
Constructor Details
#initialize(association) ⇒ AssociationScope
Returns a new instance of AssociationScope.
9 10 11 |
# File 'lib/active_fedora/associations/association_scope.rb', line 9 def initialize(association) @association = association end |
Instance Attribute Details
#association ⇒ Object (readonly)
Returns the value of attribute association.
4 5 6 |
# File 'lib/active_fedora/associations/association_scope.rb', line 4 def association @association end |
Instance Method Details
#scope ⇒ Object
13 14 15 16 |
# File 'lib/active_fedora/associations/association_scope.rb', line 13 def scope scope = klass.unscoped add_constraints(scope) end |