instance method
take!
Ruby on Rails 6.1.7.10
Since v4.0.13Signature
take!()
Same as #take but raises ActiveRecord::RecordNotFound if no record is found. Note that #take! accepts no arguments.
Source
# File activerecord/lib/active_record/relation/finder_methods.rb, line 103
def take!
take || raise_record_not_found_exception!
end
Defined in activerecord/lib/active_record/relation/finder_methods.rb line 103
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::FinderMethods