> On Jun 6, 2016, at 5:04 PM, Nana Kwame <[email protected]> wrote:
> 
> Am trying to rewrite this html (<li class="active"><a href="#">Link 
> <span
>> class="sr-only">(current)</span></a></li> <li><a href="#">Link</a></li>) 
>> into 
> ruby syntax

<%= content_tag :li, class: 'active' do %>
  <%= link_to '#' do %>
    Link
    <%= content_tag :span, '(current)', class: 'sr-only' %>
  <%- end -%>
<%- end -%>
<%= content_tag :li, link_to('Link', '#') %>

Assuming by ruby you mean ERB syntax...

Walter

> 

> Thanx
> 
> -- 
> Posted via http://www.ruby-forum.com/.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/bff1ec47f70b7309d4b94b6c9d435d38%40ruby-forum.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CB6FFDFC-F43F-4372-ACF3-7DB079B657D6%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to