instance method
find_last
Ruby on Rails 4.2.9
Since v3.0.20Signature
find_last()
No documentation comment.
Source
# File activerecord/lib/active_record/relation/finder_methods.rb, line 503
def find_last
if loaded?
@records.last
else
@last ||=
if limit_value
to_a.last
else
reverse_order.limit(1).to_a.first
end
end
end
Defined in activerecord/lib/active_record/relation/finder_methods.rb line 503
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::FinderMethods