search for: render_layout

Displaying 2 results from an estimated 2 matches for "render_layout".

2007 Aug 31
2
dynamic layouts from DB
Hello, I''m trying to get layouts from the database and use it as layout, but its not working as excepted, it always try to find something from the layout director views/layouts/ ___ .rhtml Even the below code render it as HTML and not ruby code @layout = Layout.find(:first) @test = "test" render :text = @layout.html Result: joiasd jioasd ijoaidsoj ajiod <%= @test %>
2006 Feb 04
4
Dynamic loading view from DB
Hi All, I am looking for a way to dynamically load a view, inside a template, based on uri that does not officially exist inside of rails. i.e. a typical CMS system such as wordpress that stores the html from the pages in a database. I have found a page on the the rails wiki ( http://wiki.rubyonrails.org/rails/pages/HowToRunAnActionBeforeRoutes) that seems to be what I want, but lacking a few