如何在Inherited Resources中使用Draper
换句话说,如何调用每个资源的方法(#decorate)?例如,@posts用于#index,@post用于#show
我想到了default_scope,但是所有与Draper相关的东西都需要放在控制器中,而不是放在模型中。
发布于 2013-08-22 21:01:43
你可以看看Draper's Github中的讨论:
https://stackoverflow.com/questions/14894171
复制相似问题