Note that there are some explanatory texts on larger screens.

plurals
  1. POHTML join with Ruby, How can i do this?
    text
    copied!<p>how can i join the ruby code with the html code? I want that the html "href" link with the path (ruby). Could somebody help me? For example: <code>&lt;li class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt; , the href linked to Ruby &lt;%= link_to "Home", root_path %&gt; .</code> </p> <p>Ill want that my Button Home, for example is linked with the Ruby root_path. </p> <p><strong>HTML Code</strong> </p> <pre><code>&gt; &lt;div class="navbar navbar-fixed-top"&gt; &gt; &lt;div class="navbar-inner"&gt; &gt; &lt;div class="container"&gt; &gt; &lt;a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"&gt; &gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &gt; &lt;/a&gt; &gt; &lt;a class="brand" href="#"&gt;My Workingtimes&lt;/a&gt; &gt; &lt;div class="nav-collapse"&gt; &gt; &lt;ul class="nav"&gt; &gt; &lt;li class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt; &gt; &lt;li&gt;&lt;a href="#about"&gt;Log In&lt;/a&gt;&lt;/li&gt; &gt; &lt;li&gt;&lt;a href="#contact"&gt;Sign In&lt;/a&gt;&lt;/li&gt; &gt; &lt;/ul&gt; &gt; &lt;/div&gt;&lt;!--/.nav-collapse --&gt; &gt; &lt;/div&gt; &gt; &lt;/div&gt; &gt; &lt;/div&gt; </code></pre> <p><strong>RUBY CODE</strong></p> <pre><code>&lt;div id="container"&gt; &lt;div id="content"&gt; &lt;% if flash[:notice] %&gt; &lt;p id="notice"&gt; &lt;%= flash[:notice] %&gt; &lt;/p&gt; &lt;% end %&gt; &lt;% if flash[:alert] %&gt; &lt;p id= "alert"&gt; &lt;%= flash[:alert] %&gt; &lt;/p&gt; &lt;% end %&gt; &lt;/div&gt; &lt;div id="footer"&gt; &lt;%= link_to "Home", root_path %&gt; | &lt;%= link_to "Sign In", new_user_path %&gt; | &lt;% if user_signed_in? %&gt; &lt;%= link_to "Logout", logout_path, method: :delete %&gt; | &lt;%= link_to "My Workingtimes", mytimes_path %&gt; &lt;% else %&gt; &lt;%= link_to "Login", login_path %&gt; &lt;% end %&gt; &lt;%= yield %&gt; &lt;/div&gt; &lt;/div&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload