Module: Resourced::ActiveRecord::Proxy

Includes:
Enumerable
Defined in:
lib/resourced/active_record/proxy.rb

Instance Method Summary collapse

Instance Method Details

#allObject



16
17
18
# File 'lib/resourced/active_record/proxy.rb', line 16

def all
  apply_finders.chain.all
end

#as_json(*args) ⇒ Object



24
25
26
# File 'lib/resourced/active_record/proxy.rb', line 24

def as_json(*args)
  all.as_json(*args)
end

#each(&block) ⇒ Object



20
21
22
# File 'lib/resourced/active_record/proxy.rb', line 20

def each(&block)
  all.each(&block)
end

#firstObject



8
9
10
# File 'lib/resourced/active_record/proxy.rb', line 8

def first
  apply_finders.chain.first
end

#lastObject



12
13
14
# File 'lib/resourced/active_record/proxy.rb', line 12

def last
  apply_finders.chain.last
end

#to_json(*args) ⇒ Object



28
29
30
# File 'lib/resourced/active_record/proxy.rb', line 28

def to_json(*args)
  all.to_json(*args)
end