.> > def edit > layout ''edit_2'' > ... > enddef edit #calculations redirect_to :action =>''something'', :layout => ''something'' or render :template => ''edit'', :layout => ''edit_2'' or ... end hope it helps, harp -- Posted via http://www.ruby-forum.com/.
hi! how can i put different layouts for the actions in the same controller? i was putting the layout always at the beginning of the controller, and i tought, if i put a layout in an action, it would be work, but nop. i mean: UserAdminController < ApplicationController layout ''admin'' ... def edit layout ''edit_2'' ... end end how can i resolve my problem? ty! -- Posted via http://www.ruby-forum.com/.
vincent wrote:> hi! how can i put different layouts for the actions in the same > controller? > > i was putting the layout always at the beginning of the controller, and > i tought, if i put a layout in an action, it would be work, but nop. > > i mean: > > UserAdminController < ApplicationController > > layout ''admin'' > ... > > def edit > layout ''edit_2'' > ... > end > > end > > how can i resolve my problem? ty! >def edit render :action => "edit", :layout => "nameofyourlayout end regards, Henning Kilset