Method: ActiveRecord::FinderMethods#last!
- Defined in:
- activerecord/lib/active_record/relation/finder_methods.rb
#last! ⇒ Object
Same as #last but raises ActiveRecord::RecordNotFound if no record is found. Note that #last! accepts no arguments.
182 183 184 |
# File 'activerecord/lib/active_record/relation/finder_methods.rb', line 182 def last! last || raise_record_not_found_exception! end |