Named link to image


#1

Hiall,

Call me stupid if you like .,) but it seems i can’t figure out how to
get a named link using a combination of link_to and image_tag. What I
need is basically a link displaying a name along with some image to
indicate status (open,working,finished). I found no combination of
link_to and image_tag that accepts a name, this seems to be solely
used for making whole images into links … What is it that I don’t
get :)?

TIA
Martin G.


#2

Martin G. wrote:

Hiall,

Call me stupid if you like .,) but it seems i can’t figure out how to
get a named link using a combination of link_to and image_tag. What I
need is basically a link displaying a name along with some image to
indicate status (open,working,finished). I found no combination of
link_to and image_tag that accepts a name, this seems to be solely
used for making whole images into links … What is it that I don’t
get :)?

<%= link_to image_tag(…) + ‘
Open’, :action => ‘foo’, … %>

Won’t that do the trick?


#3

Thank you so much Alex! That works perfect :wink:

cheers
Martin


#4

Martin G. wrote:

Thank you so much Alex! That works perfect :wink:
No worries :slight_smile:

With so much magic going on, it’s quite easy to forget that in a lot of
cases, you’re just dealing with strings…


Alex