Joshua Muheim
2006-Aug-17 19:29 UTC
[Rails] Disable rendering of layout using a GET parameter?
Hi all Is there some sort of a built-in possiblity to disable the rendering of the layout using a GET parameter? Something like :url_for :controller => :news, :action => :show, :id => news_item, :layout => false This should construct something like that: /news/show/123&layout=false And automatically the layout wouldn''t be rendered. Is this already built-in, or should I code it on my own? Thanks for info. Joshua -- Posted via http://www.ruby-forum.com/.
Chris Hall
2006-Aug-17 19:38 UTC
[Rails] Disable rendering of layout using a GET parameter?
if you don''t want to have the layout applied for a particular action, just do layout ''my_layout'', :except => :show in your NewsController and no layout will be applied for the show action. On 8/17/06, Joshua Muheim <forum@josh.ch> wrote:> Hi all > > Is there some sort of a built-in possiblity to disable the rendering of > the layout using a GET parameter? > > Something like > > :url_for :controller => :news, :action => :show, :id => news_item, > :layout => false > > This should construct something like that: > > /news/show/123&layout=false > > And automatically the layout wouldn''t be rendered. Is this already > built-in, or should I code it on my own? > > Thanks for info. > Joshua > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Seemingly Similar Threads
- Creating a comments system for multiple types of content
- Overwrite form helper methods and call old ones in new ones?
- What helper makes "News Item" out of "news_item"?
- model-controller-paradigm: What about admin controllers?
- specing a call to render :layout => "some_layout"