开发者

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?

开发者 https://www.devze.com 2023-01-21 05:59 出处:网络
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.f

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消