method

find_by_attributes

Importance_1
v3.2.13 - Show latest stable - 1 note - Class: ActiveRecord::FinderMethods
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”)