Method: Sequel::Model::ClassMethods#find

Defined in:
lib/sequel/model/base.rb

#find(*args, &block) ⇒ Object

Finds a single record according to the supplied filter. You are encouraged to use Model.[] or Model.first instead of this method.

Artist.find(name: 'Bob')
# SELECT * FROM artists WHERE (name = 'Bob') LIMIT 1

Artist.find{name > 'M'}
# SELECT * FROM artists WHERE (name > 'M') LIMIT 1


408
409
410
# File 'lib/sequel/model/base.rb', line 408

def find(*args, &block)
  first(*args, &block)
end