Module: ActiveRecord::FinderMethods

Defined in:
lib/reactive_record/first_last_limits.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#first(*args) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/reactive_record/first_last_limits.rb', line 3

def first(*args)
  options = args.extract_options!
  if options.any?
    apply_finder_options(options).first(*args)
  else
    find_first(*args)
  end
end

#last(*args) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/reactive_record/first_last_limits.rb', line 12

def last(*args)
  options = args.extract_options!
  if options.any?
    apply_finder_options(options).last(*args)
  else
    find_last(*args)
  end
end