Class: User

Inherits:
Object
  • Object
show all
Extended by:
Ambition
Defined in:
lib/ambition/test/helper.rb

Instance Attribute Summary

Attributes included from Ambition

#query_context

Class Method Summary collapse

Methods included from Ambition::Where

#detect, #select

Methods included from Ambition::Order

#sort_by

Methods included from Ambition::Limit

#[], #first

Methods included from Ambition::Enumerable

#each

Methods included from Ambition::Count

#size

Class Method Details

.reflectionsObject



14
15
16
17
18
19
20
21
22
# File 'lib/ambition/test/helper.rb', line 14

def self.reflections
  return @reflections if @reflections
  @reflections = {}
  @reflections[:ideas]    = Reflection.new(:has_many,   'user_id',     :ideas,   'ideas')
  @reflections[:invites]  = Reflection.new(:has_many,   'referrer_id', :invites, 'invites')
  @reflections[:profile]  = Reflection.new(:has_one,    'user_id',     :profile, 'profiles')
  @reflections[:account]  = Reflection.new(:belongs_to, 'account_id',  :account, 'accounts')
  @reflections
end

.table_nameObject



24
25
26
# File 'lib/ambition/test/helper.rb', line 24

def self.table_name
  'users'
end