How can I change the layout in the action method?
def show
if(params[:id] > 0)
layout :layout1
else
layout :default
end
end
Is this possible?
How can I change the layout in the action method?
def show
if(params[:id] > 0)
layout :layout1
else
layout :default
end
end
Is this possible?
Have a look at this guide:
Please check to see if your questions are answered in the guides before
posting here.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs