Layouts, stupid problem :P

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
layout ‘edit_2’

end

def edit
#calculations
redirect_to :action =>‘something’, :layout => ‘something’
or
render :template => ‘edit’, :layout => ‘edit_2’
or

end

hope it helps,

harp

vincent wrote:

layout ‘admin’

def edit
render :action => “edit”, :layout => "nameofyourlayout
end

regards,
Henning K.