link_to rails链接到已发布的网站

时间:2014-03-04 23:27:13

标签: ruby-on-rails link-to

目前我在Ruby on Rails上的所有link_to标签在localhost:3000上运行时将我引导到我的实时网站上吗?

目前我的代码是

%nav.col-lg-6.col-md-8.col-sm-10.col-xs-12.clearfix
  %ul
    %li
      =link_to 'Contact' , contact_path, :class => is_active?('contact')
    %li
      =link_to 'Projects', projects_path, :class => is_active?('index')
    %li
      =link_to 'Home', root_path, :class => is_active?('home')

https://github.com/Snowfiring/Mika

http://jsfiddle.net/kN6QS/

1 个答案:

答案 0 :(得分:1)

您的应用程序布局中有这一行:

https://github.com/Snowfiring/Mika/blob/master/app/views/layouts/application.html.haml#L10

这会将所有网址设置为基于该基本网址。