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 Gamsjaeger
Martin Gamsjaeger 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(...) + ''<br />Open'', :action => ''foo'', ... %> Won''t that do the trick? -- Alex
Thank you so much Alex! That works perfect ;) cheers Martin On 5/9/06, Alex Young <alex@blackkettle.org> wrote:> Martin Gamsjaeger 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(...) + ''<br />Open'', :action => ''foo'', ... %> > > Won''t that do the trick? > > -- > Alex > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Martin Gamsjaeger wrote:> Thank you so much Alex! That works perfect ;)No worries :-) 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> > cheers > Martin > > On 5/9/06, Alex Young <alex@blackkettle.org> wrote: > >> Martin Gamsjaeger 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(...) + ''<br />Open'', :action => ''foo'', ... %> >> >> Won''t that do the trick? >> >> -- >> Alex >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails