Img & link inline?


#1

Hello everyone!

I Have a small image (icone) followed by an icone. Here is my code :
<%= image_tag “/error.png” if (…) -%><%= link_to post.id,
post_path(post) %>

My question is : how can I have this two things inline ?

Thank you!


#2

I don’t know if I got your question right but I think you want something
this:
<%= link_to(image_tag(“error.png” , :size => “50x22” ), :url =>
post_path(post) )
%>