can i call model from other views in rails?
Say I have a model called Book. I have a controller named books and related views for this model. Is it possible开发者_高级运维 if I have another controller work with the model Book?
Thanks all. :)
It works inside any Controller, View or Model. To refer your model use upper cased class name. For example: Book
Yes. But, why would you want to do that? What is the usecase?
精彩评论