Class: Gecko::Record::UserAdapter

Inherits:
BaseAdapter show all
Defined in:
lib/gecko/record/user.rb

Instance Attribute Summary

Attributes inherited from BaseAdapter

#client, #last_response

Instance Method Summary collapse

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

#currentGecko::Record::User

Return the the logged in user

Returns:



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