method
find_by_attributes
v3.1.0 -
Show latest stable
-
1 note -
Class: ActiveRecord::FinderMethods
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0 (0)
- 3.0.9 (0)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0
- 7.1.3.2
- 7.1.3.4
- What's this?
Register or
log in
to add new notes.
rakshit -
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”)