Rails Select Tag and Onchange Event Calling a Remote Function with Default Option Selected
Here is a little code snippet that will fire off a request to update_client_path when you change the select field. This stands alone, rather than being apart of a larger form. The Client::CATEGORY argument is a hash, which I populated manually in my Clien...
Written by Sean Behan on 06/17/2012
Collection Select Helper and OnChange Event in Rails
Given a collection of Active Record objects, you may use the collection_select helper method to produce a select form field. You need to pass in a number of arguments to the helper function.
1) object - your model object used in the collection
2) method ...
Written by Sean Behan on 06/17/2012
Select Distinct in Rails with Active Record
User.find :all, :select => "DISTINCT occupation"
Written by Sean Behan on 06/17/2012