Method: ActiveNode::FinderMethods#find_by!
- Defined in:
- lib/active_node/graph/finder_methods.rb
#find_by!(*args) ⇒ Object
Like find_by, except that if no record is found, raises an ActiveRecord::RecordNotFound error.
84 85 86 |
# File 'lib/active_node/graph/finder_methods.rb', line 84 def find_by!(*args) where(*args).take! end |