Module: Sequel::Plugins::FindBang::ClassMethods
- Defined in:
- lib/sequel/plugins/find_bang.rb
Instance Method Summary collapse
-
#find!(**args) ⇒ Object
Calls
first!
, but provides a more helpful error message when no records are found.
Instance Method Details
#find!(**args) ⇒ Object
Calls first!
, but provides a more helpful error message when no records are found.
8 9 10 11 12 |
# File 'lib/sequel/plugins/find_bang.rb', line 8 def find!(**args) self.first!(**args) rescue Sequel::NoMatchingRow => ex raise Brut::Framework::Errors::NotFound.new(resource_name: self.name,search_terms: args.inspect,context: ex.) end |