layout_by_action method for Rails controllers