Forum: Ruby on Rails openstreetmap as 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.
76841a063077b64ab9e9856841e22dda?d=identicon&s=25 Focon Rubix (mohamed_e)
on 2014-08-15 09:47
(Received via mailing list)
Hi,
I am using openlayers gem to show a openstreetmap as div in a a rails
app
how can I make this div as a link to an other page  in the rails app
using
link_to tag


regards
34dbedb61632979ce94aaa9c6ae20c04?d=identicon&s=25 Eric Saupe (eric_s21)
on 2014-08-15 17:43
(Received via mailing list)
<%= link_to('my_link') do %>
  <div>OPEN STREETMAP CONTENT</div><% end %>

You can put a div inside of the <a> generated by link_to and this will
work
for you but putting block elements inside of <a> is not really good
practice. Instead you could try <span> instead of <div>
This topic is locked and can not be replied to.