Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3's link_to('»', url) won't work if it is » or other entities

because it will not show up as » but will show up as &raquo. Is there a way to show it?

like image 478
nonopolarity Avatar asked Sep 21 '10 03:09

nonopolarity


People also ask

How does Link_to work in Rails?

Rails is able to map any object that you pass into link_to by its model. It actually has nothing to do with the view that you use it in. It knows that an instance of the Profile class should map to the /profiles/:id path when generating a URL.

What is Link_to?

method: symbol of HTTP verb - This modifier will dynamically create an HTML form and immediately submit the form for processing using the HTTP verb specified. Useful for having links perform a POST operation in dangerous actions like deleting a record (which search bots can follow while spidering your site).

How do I link pages in Ruby on Rails?

open index. html. erb file in app>>views>>home folder use in atom editor. After you open index file now add following HTML link code in that file and end with <br /> tag.


1 Answers

Try:

link_to "&raquo;".html_safe, url

like image 134
Mitch Dempsey Avatar answered Oct 12 '22 09:10

Mitch Dempsey