instance method
find_take
Ruby on Rails 5.0.7.2
Since v4.0.13Signature
find_take()
No documentation comment.
Source
# File activerecord/lib/active_record/relation/finder_methods.rb, line 523
def find_take
if loaded?
records.first
else
@take ||= limit(1).records.first
end
end
Defined in activerecord/lib/active_record/relation/finder_methods.rb line 523
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::FinderMethods