Posts Tagged ‘form’

Invalid Authenticity Token Error in Rails

Got the following error today when trying to submit a form in Ruby on Rails:
ActionController::InvalidAuthenticityToken
The solution turned out to be as easy as inserting

into my form.
[via Nabble]

Rails Auto-Clearing Input Field

At certain times you might want to have a form input field have a description or default value that automatically clears when the user clicks the field to enter text.
An example of this is Digg’s search box. By default, it reads, “Search Digg…”, but when you click it, the default text disappears and makes room [...]

Basic Search Form in Rails

If you want to add a simple search page to your rails application, you’ll probably want a form that uses GET rather than POST, since GET will allow your visitors to bookmark the results page, and won’t complain if the user decides to refresh the results page.
Also, you’ll want the form to simply update the [...]