views:

20

answers:

1

Hi,

I can use dynamic find_by_* methods in rails, such as Company.find_by_name_and_zip_and_phone, but how can we use a multipart property in it? Such as the update_at property, when I try to use Company.find_by_name_and_zip_and_phone_and_update_at, i got an error:

NoMethodError: undefined method `find_by_state_and_name_and_phone_and_update_at' for #<Class:0x45769e0>

How can I fix this problem? Thanks.

+1  A: 

What you have should work fine except I think you mean updated_at.

mark