lib/devise/activeresource/adapter.rb
# Find the first instance, optionally matching conditions
#
# You can call with just conditions, providing a hash
#
#   User.to_adapter.find_first :name => "Fred", :age => 23
#
#   User.to_adapter.find_first :conditions => {:name => "Fred", :age => 23}
#
Find the first instance, optionally matching conditions
You can call with just conditions, providing a hash




Find the first instance optionally matching conditions You can call with just conditions providing a hash
def find_first(options = {})
        conditions, limit, offset = extract_conditions!(options)
        params = conditions.merge(limit_offset_hash(limit, offset))
        klass.find(:first, params: params)
      rescue ActiveResource::InvalidRequestError
        nil
      end
def find_first ( options = { } ) conditions , limit , offset = extract_conditions! ( options ) params = conditions . merge ( limit_offset_hash ( limit , offset ) ) klass . find ( :first , params : params ) rescue ActiveResource :: InvalidRequestError nil end
Find the first instance, optionally matching conditions
You can call with just conditions, providing a hash
Find the first instance optionally matching conditions You can call with just conditions providing a hash
options
<not_specific>