Forum: Ruby on Rails openstreetmap as link

76841a063077b64ab9e9856841e22dda?d=identicon&s=25 Focon Rubix (mohamed_e)
on 2014-08-15 09:47
(Received via mailing list)
I am using openlayers gem to show a openstreetmap as div in a a rails
how can I make this div as a link to an other page  in the rails app
link_to tag

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
for you but putting block elements inside of <a> is not really good
practice. Instead you could try <span> instead of <div>
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.