Use link_to into Controller in Ruby on Rails 3

You can use the variable
viewcontext
in a Controller to use the link
to function like this:
viewcontext.linkto “Link”, :root_path

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *