Forum: Ruby on Rails an image that is a clickable link?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Peter M. (Guest)
on 2006-01-23 23:49
(Received via mailing list)
Hi,

How do I make an image that is a clickable link the rails way? Is
there a view helper for this?

Thanks,
Peter
Mel R. (Guest)
on 2006-01-23 23:58
(Received via mailing list)
Hey Peter,

I just learned how to do that! Try this:
http://api.rubyonrails.com/classes/ActionView/Help...

HTH

Mel
Ben R. (Guest)
on 2006-01-24 00:01
(Received via mailing list)
Put an image_tag inside a link_to tag.

e.g. ~ <%= link_to(image_tag("myimage"), {:controller => "mycontroller",
:action => "myaction"}) %>
Bama Test (Guest)
on 2006-01-24 00:04
(Received via mailing list)
>From the API documentation

Combine the link_to and image_tag yourself  like:
link_to(image_tag("rss", :size => "30x45", :border => 0),
"http://www.example.com")(or you can go to this link to go directly to
the specific page i referenced
http://api.rubyonrails.com/classes/ActionView/Help...

----- Original Message ----
From: Peter M. <removed_email_address@domain.invalid>
To: removed_email_address@domain.invalid
Sent: Monday, January 23, 2006 3:46:23 PM
Subject: [Rails] an image that is a clickable link?

Hi,

How do I make an image that is a clickable link the rails way? Is
there a view helper for this?

Thanks,
Peter
Peter M. (Guest)
on 2006-01-24 00:20
(Received via mailing list)
Thanks all.
This topic is locked and can not be replied to.