Flowdock
method

find_by_attributes

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 1 note - Class: ActiveRecord::FinderMethods

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

find_by_attributes(match, attributes, *args) protected

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Show source
Register or log in to add new notes.
August 17, 2013
0 thanks

for finding content

it will use all the field related to particular table so you can find data by any table field like Table name => ABC(:id, :name, :address) if you want to find data related to id or name or address than only write

ABC.find_by_id(1)

ABC.find_by_name(“abc”)

ABC.find_by_address(“abc”)

find_by_field_name will find only first data match with it

if u want to find all data than enter

ABC.find_all_by_id(1)

ABC.find_all_by_name(“abc”)

ABC.find_all_by_name(“abc”)