I basically want to prevent searches that are less than 3 characters long.
In Rails 2.x, I would just do this in an onClick event. I understand how to handle AJAX requests and responses in Rails 3 now, but wouldn’t using the onClick event be considered obtrusive in Rails 3?
Got it!
I put this code in application.js:
My form is:
Voilá!