How to get root path of rails app -
i novice rails. have been using lamp long time. looking {{url::to('/')}} laravel.
i not want use link_to creates entire anchor tag defeats purpose of isolating views. want value put in href tag.
<a href="<%= write here??? %>" class="btn btn-success">this link</a>
rails has has root_path
, root_url
helpers
you seem quite confused link_to
not compromise "isolation" of views. helper method makes possible create dynamic html without doing lot of interpolation.
<%= link_to t('home'), root_path, class: 'btn btn-success' %>
Comments
Post a Comment