link_to添加bootstrap后没有链接的路径

时间:2013-04-02 00:43:03

标签: ruby-on-rails-3 twitter-bootstrap routes rake

我有一个rails应用程序,它构建在此处托管的SAAS条带应用程序上:

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

我添加了twitter bootstrap,我的路径不再创建链接。

例如我的路线文件有:

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  

1 个答案:

答案 0 :(得分:0)

所以这似乎是由于我从wrapbootstrap模板添加资产/图像目录时出现的对图像的错误引用。

我将此行添加到config.assets.enabled = true下面的application.rb文件中

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

要让我的图像显示在此之后我必须将它们更改为rails格式,所以背景:img(..)成为

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