hi,
i’m trying to render this html:
clear cart !the best i can do is:
<%= link_to content_tag(:span, image_tag(“img/clear.png”, :alt =>
‘arrow’)), clear_cart_path, :class => “big_button”, :title => “clear”
-%>
any ideas???
cheers.
hi,
i’m trying to render this html:
clear cart !the best i can do is:
<%= link_to content_tag(:span, image_tag(“img/clear.png”, :alt =>
‘arrow’)), clear_cart_path, :class => “big_button”, :title => “clear”
-%>
any ideas???
cheers.
bump.
anyone?

Michael D. wrote:
hi,
i’m trying to render this html:
clear cart !![]()
the best i can do is:
<%= link_to content_tag(:span, image_tag(“img/clear.png”, :alt =>
‘arrow’)), clear_cart_path, :class => “big_button”, :title => “clear”
-%>any ideas???
cheers.
First, I’d move the content_tag code into a helper.
def clear_cart_button
content_tag(:span, ‘clear cart !’ + image_tag(“img/clear.png”, :alt
=> ‘arrow’))
end
Then in your view…
<%= link_to clear_cart_button, clear_cart_path, :class => “big_button”,
:title => “clear” %>
Assuming you’ve added the clear_cart named route, that should work.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs