ruby code not working under the "ui" class when using semantic-ui -


i want use semantic-ui ruby-on-rails project

(here project: https://github.com/liyingtw/c9_booking/tree/filling-in-layout)

however, ruby code not work in html tag class = "ui".

here code:

<nav class="ui menu">     <a class="active teal item">       <i class="home icon"></i>        <%= link_to "main", :controller => "order", :action => "index" %>     </a>             <% if @user.is_admin? %>         <a class="active teal item">           <%= link_to "management - users", :controller => "admin", :action => "users_index" %>         </a>                 <% end %>     <div class="ui orange inverted right menu">       <a class="pink item">         <i class="sign out icon"></i>         <%= link_to "logout", :controller => "login", :action => "logout" %>       </a>     </div> </nav> 

the code <%= link_to ... %> not working while <% if @user.is_admin? %> working.

i found if use <nav class="menu"> instead of <nav class="ui menu">, code in ruby working, don't know why.

if has idea or tips on how can solve this, i'd extremely grateful.

thanks facebook.

because cannot put tag within one, use code follow instead:

<%= link_to({:controller => 'user', :action => 'profile'}, class: 'green item') %>     <i class='setting icon'></i>     profile <% end %> 

it's work me!!


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -