I am confused about the main difference (s) between link_to is used in your view, and generates HTML code for a link This will generate the following HTML in your view Your controller uses a redirect and a render to answer a request. Redirect_to will only redirect the request to a new URL, if you have any in your controller link_to ,
Redirect_to and code
in the rail code can anybody please explain.
& lt;% = link_to "Google", "http://google.com"%>
& lt; A href = "http://google.com" & gt; Google & lt; / A & gt;
redirect_to "http://google.com"
No comments:
Post a Comment