2013-04-02 81 views
0

我有一個在這裏舉行的是建立在SAAS條紋應用Rails應用程序:的link_to路徑引導

http://railsapps.github.com/rails-recurly-subscription-saas/

我加入Twitter的引導到這一點,我的路徑不再產生鏈接。

例如我的路線文件有:

resources :users 

但是沒有users_path創造我的ERB文件

<%= link_to 'Admin', users_path %> 

任何意見或其他信息我可以提供一個鏈接到的位置?

耙路線:

E:\Sites>rake routes 
      stripe_event  /stripe      StripeEvent::Engine 
      content_gold GET /content/gold(.:format)  content#gold 
      content_silver GET /content/silver(.:format)  content#silver 
     content_platinum GET /content/platinum(.:format) content#platinum 
        root  /       home#index 
        root  /       home#index 
     new_user_session GET /users/sign_in(.:format)  devise/sessions#new 
      user_session POST /users/sign_in(.:format)  devise/sessions#create 
    destroy_user_session DELETE /users/sign_out(.:format)  devise/sessions#destroy 
      user_password POST /users/password(.:format)  devise/passwords#create 
     new_user_password GET /users/password/new(.:format) devise/passwords#new 
     edit_user_password GET /users/password/edit(.:format) devise/passwords#edit 
         PUT /users/password(.:format)  devise/passwords#update 
cancel_user_registration GET /users/cancel(.:format)  registrations#cancel 
     user_registration POST /users(.:format)    registrations#create 
    new_user_registration GET /users/sign_up(.:format)  registrations#new 
    edit_user_registration GET /users/edit(.:format)   registrations#edit 
         PUT /users(.:format)    registrations#update 
         DELETE /users(.:format)    registrations#destroy 
      update_plan PUT /update_plan(.:format)   registrations#update_plan 
      update_card PUT /update_card(.:format)   registrations#update_card 
        users GET /users(.:format)    users#index 
         POST /users(.:format)    users#create 
       new_user GET /users/new(.:format)   users#new 
       edit_user GET /users/:id/edit(.:format)  users#edit 
        user GET /users/:id(.:format)   users#show 
         PUT /users/:id(.:format)   users#update 
         DELETE /users/:id(.:format)   users#destroy 
+0

你可以添加'耙路線'的問題? – fmendez

+0

你是說你的users_path是空白的?或者是你的<%= link_to'Admin',users_path%>'空? –

+0

在這種情況下,'管理員'文本將出現,但它不會是超鏈接。 – Austio

回答

0

因此,這似乎是壞引用圖片時,我從wrapbootstrap模板添加的資產/ images目錄所發生所致。

我加入這行到我的application.rb中文件config.assets.enabled =真

config.assets.paths << Rails.root.join("app", "images") 

下面爲了讓我的圖片顯示了在此之後,我不得不改變他們在軌道格式,所以背景:img(..)變成

background: image-url('images/social_icons.png')