If I would like to use a layout for a certain action (say, the show action) that is different from the layout declared at the top of the controller.rb file, how could I do t
Following example applies desired layout to specific action, otherwise, it uses default layout (layouts/application.html.erb).
class ArticlesController < ApplicationController
layout "article_editor", only: [:new, :edit]
def index
# default layout
end
def new
# article_editor layout
end
def edit
# article_editor layout
end
end