1

spree アプリに追加したコントローラで spree_application レイアウトを使用しようとしています。

class ShotsController < Spree::BaseController

  layout 'spree_application'

  def index
    @shots = Shot.all
  end

  def show
    @shot=Shot.find(params[:id])
  end   

end

しかし、私が shots_path に行こうとすると、エラーが発生しました:

NoMethodError in Shots#index

Showing /Users/me/.rvm/gems/ruby-1.9.3-p327/gems/spree_core-    1.3.2/app/views/spree/shared/_nav_bar.html.erb where line #14 raised:

undefined method `current_order' for #< ShotsController:0x007f9c6b746e40>

誰かが私を助けることができますか?

4

2 に答える 2