There might be a better way to do this, but I\'m trying to make an if statement in rails, based on the current action, in a controller (this will be used in a view).
class ApplicationController < ActionController::Base
layout :set_layout
def set_layout
case params[:action]
when "foo"
"foo_layout"
when "bar"
"bar_layout"
...
else
"default_layout"
end
end
...
end