我fork了一个gem并改变了一些东西,但我真的很绝望。我总是得到模板丢失:
模板丢失缺少模板 spree/addresses/index、spree/store/index、spree/base/index、application/index with {:locale=>[:de, :en], :formats=>[:html], : handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee, :haml, :rabl], :versions=>[:v1]}。在以下位置搜索:*“/Users/Manu/Documents/rails_projects/my_store_dev/app/views”*“/Users/Manu/.rvm/gems/ruby-2.1.2/bundler/gems/spree_my_favourites-6076d6ee5cb2/app/views” * "/Users/Manu/.rvm/gems/ruby-2.1.2/bundler/gems/spree_address_book-b66e2abf6429/app/views" * "/Users/Manu/.rvm/gems/ruby-2.1.2/bundler/ gems/spree-promotion-roles-rule-0fd33e96c5c4/app/views" * "/Users/Manu/.rvm/gems/ruby-2.1.2/bundler/gems/spree-promotion-exclude-specials-rule-1debc9765387/应用程序/视图" * "/Users/Manu/.rvm/gems/ruby-2.1.
这是我的路线文件:
Spree::Core::Engine.routes.draw do
# Add your extension routes here
namespace :account do
resources :orders, only: [:index]
resources :favourites, only: [:index]
resources :addresses, only: [:index]
end
end
这是我AddressesController
的controller/spree/account/
:
module Spree
module Account
class AddressesController < Spree::StoreController
before_filter :check_logged_in_user
def index
@user = try_spree_current_user
end
private
def check_logged_in_user
unless try_spree_current_user
account_addresses__path
redirect_to spree_login_path
end
end
end
end
end
我有一个index.haml
in views/spree/account/addresses/
,这是 rake 路线的一部分:
account_orders GET /account/orders(.:format) spree/account/orders#index
account_favourites GET /account/favourites(.:format) spree/account/favourites#index
account_addresses GET /account/addresses(.:format) spree/account/addresses#index
有人可以给我一个提示吗?