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