Flowdock

Notes posted by rakshit

RSS feed
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”)