レイアウト 'pages.html.erb'が指定されたPagesControllerがあります。同じコントローラ内に2つの異なるレイアウトテンプレートがありますか?
class PagesController < Spree::StoreController
layout 'pages'
respond_to :html
def lifestyle
render 'lifestyle'
end
def co_step_1
render 'co_step_1'
end
def co_step_2
render 'co_step_2'
end
end
別のレイアウトを使用する別の方法をPagesControllerで使用することはできますか? 言い換えれば、別の方法でlayout 'pages.html.erb'
を上書きしたいと思います。
これは 'before_action'フックよりも優れています。 –