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?
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.
What you have should work fine except I think you mean updated_at.
精彩评论