Forum: Ruby on Rails Update Paramaters with link_to?

Posted by Samuel Smith (Guest)
on 2012-12-21 23:20
(Received via mailing list)
link_to "Click Me", ?????

When the link is clicked, I want to increment the value of
@project.status_id

Not finding any FAQs on how to do this.
Posted by Hassan Schroeder (Guest)
on 2012-12-22 02:28
(Received via mailing list)
On Thu, Dec 20, 2012 at 12:58 PM, Samuel Smith <samueljsmith@gmail.com> 
wrote:

> When the link is clicked, I want to increment the value of
> @project.status_id
>
> Not finding any FAQs on how to do this.

FAQ? Seriously?

What does clicking a link do? It triggers the browser to send a
request to the server.

In Rails, a controller determined by your routes configuration is
passed that request, and does whatever you want with it.

It's probably a bad idea to do this with a GET request, but in any
case I'd suggest working through a good basic Rails tutorial
before anything else.

Good luck,
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.