Class: Gecko::Record::UserAdapter
- Inherits:
-
BaseAdapter
- Object
- BaseAdapter
- Gecko::Record::UserAdapter
- Defined in:
- lib/gecko/record/user.rb
Instance Attribute Summary
Attributes inherited from BaseAdapter
Instance Method Summary collapse
-
#current ⇒ Gecko::Record::User
Return the the logged in user.
Methods inherited from BaseAdapter
#build, #count, #extract_collection, #extract_record, #fetch, #find, #find_many, #first, #forty_two, #has_record_for_id?, #initialize, #instantiate_and_register_record, #parse_records, #peek_all, #record_for_id, #save, #size, #where
Constructor Details
This class inherits a constructor from Gecko::Record::BaseAdapter
Instance Method Details
#current ⇒ Gecko::Record::User
Return the the logged in user
36 37 38 39 40 41 42 |
# File 'lib/gecko/record/user.rb', line 36 def current if has_record_for_id?(:current) record_for_id(:current) else @identity_map[:current] = find(:current) end end |