1
我試圖使用spree_application佈局的控制器,我剛剛加入到我的大禮包應用使用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>
沒有人可以幫助我嗎?