简体   繁体   English

管理员专用的Rails 3控制器呈现默认的“显示”视图

[英]Rails 3 specific controller for admin renders the default 'show' view

that's my problem, I'm trying to implement a separate admin layer in my app following this good tutorial: http://iain.nl/backends-in-rails-3-1 那是我的问题,我正在尝试按照此优秀教程在我的应用中实现单独的管理层: http : //iain.nl/backends-in-rails-3-1

Everything works smooth but in views/backend/items/index.html.erb, with the common: 一切正常,但可以在views / backend / items / index.html.erb中进行,并具有以下共同点:

<%= link_to 'Show', item %>

I'm geting the default application view: views/items/show instead of backend/views/items/show 我正在获取默认的应用程序视图:视图/项目/显示,而不是后端/视图/项目/显示

The call to the index page is being made from the backend/items_controller but it seems that the Rails 3 view inheritance is skiping the first part in the chain. 索引页面的调用是从backend / items_controller进行的,但是Rails 3视图继承似乎正在跳过链的第一部分。

Any idea? 任何想法?

Thanks! 谢谢!

From the tutorial shown, should it be: 根据显示的教程,应该是:

link_to 'show', resource_path(resource) 

?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM