Class: Authlogic::Session::AuthenticatesManyAssociation
- Inherits:
-
Object
- Object
- Authlogic::Session::AuthenticatesManyAssociation
- Defined in:
- lib/authlogic/session/authenticates_many_association.rb
Overview
Authenticates Many Association
An object of this class is used as a proxy for the authenticates_many relationship. It basically allows you to “save” scope details and call them on an object, which allows you to do the following:
@account.user_sessions.new
@account.user_sessions.find
# ... etc
You can call all of the class level methods off of an object with a saved scope, so that calling the above methods scopes the user sessions down to that specific account.
Instance Attribute Summary collapse
-
#find_options ⇒ Object
:nodoc:.
-
#id ⇒ Object
:nodoc:.
-
#klass ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#initialize(klass, find_options, id) ⇒ AuthenticatesManyAssociation
constructor
A new instance of AuthenticatesManyAssociation.
Constructor Details
#initialize(klass, find_options, id) ⇒ AuthenticatesManyAssociation
Returns a new instance of AuthenticatesManyAssociation.
15 16 17 18 19 |
# File 'lib/authlogic/session/authenticates_many_association.rb', line 15 def initialize(klass, , id) self.klass = klass self. = self.id = id end |
Instance Attribute Details
#find_options ⇒ Object
:nodoc:
13 14 15 |
# File 'lib/authlogic/session/authenticates_many_association.rb', line 13 def @find_options end |
#id ⇒ Object
:nodoc:
13 14 15 |
# File 'lib/authlogic/session/authenticates_many_association.rb', line 13 def id @id end |
#klass ⇒ Object
:nodoc:
13 14 15 |
# File 'lib/authlogic/session/authenticates_many_association.rb', line 13 def klass @klass end |