阅读背景:

Rails 3错误检查关联的存在

来源:互联网 

I has a model "modela" that has a has_many_through relationship with model "submodelb". In a controller I want to check if modela has any submodelb associated with it. I have tried the two code examples below; however, the both throw the error "undefined method `submodelbs'" if modela does not have any submodelbs. Please help me see what I am doing wrong. I has a model "modela" that has a has_many_thro




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: