Class: Gecko::Record::UserAdapter

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

Instance Attribute Summary

Attributes inherited from BaseAdapter

#client

Instance Method Summary collapse

Methods inherited from BaseAdapter

#build, #count, #extract_collection, #extract_record, #fetch, #find, #find_many, #has_record_for_id?, #initialize, #instantiate_and_register_record, #parse_records, #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:



38
39
40
41
42
43
44
# File 'lib/gecko/record/user.rb', line 38

def current
  if self.has_record_for_id?(:current)
    record_for_id(:current)
  else
    @identity_map[:current] = find(:current)
  end
end