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