开发者

RoR & ACTS_AS_Tree & display show page from database vs. display content

开发者 https://www.devze.com 2023-03-28 09:30 出处:网络
All, Working on a RoR app for work.Finally got acts as tree working with a database connection (railscast.com ep开发者_Python百科isode 162).Trying to shift from displaying content in the database to

All,

Working on a RoR app for work. Finally got acts as tree working with a database connection (railscast.com ep开发者_Python百科isode 162). Trying to shift from displaying content in the database to redirecting to the contents of the page.content database entry -- any ideas? I've tried simply replacing the display action with redirect_to, no dice. Googling all over the place - out of time - help..

My flow is as follows:

pages.rb:  acts_as_tree command
application.html.erb: menu display for root entries
pages/show.html.erb:

- displays submenu, no problem - display breadcrumbs, no problem - display page name, no problem (envision removing this once redirect works) - display contents of page.content: <%= simple_format @page.content %> no problem

Problem is I want to redirect to the contents of @page.content and not display it. Or I can shift to a different controller action, but the idea is that I need to be able to use the navigation menu to move around to different pages (that alrady exist) vs just showing the content. Ideas?

Thanks, Adam

0

精彩评论

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