If you are not interested in installing a plugin just for one method(state_select) then You can put state_select.rb file in you rails lib directory. And include state_select.rb file in your controller where ever you want to use state_select method.
The url for state_select.rb is http://github.com/bansalakhil/stateselect/tree/master/lib/state_select.rb
Feedback please….
Should upcase the country name when appending _STATE to it.
Also need some adjustments to the Canadian provinces:
[“Alberta”, “British Columbia”, “Manitoba”, “New Brunswick”, “Newfoundland”, “Northwest Territories”, “Nova Scotia”, “Nunavut”, “Ontario”, “Prince Edward Island”, “Quebec”, “Saskatchewan”, “Yukon”],
Otherwise, looks nice!
Also missed Alaska and need to sort the US state names properly
Thanks Garth,
I will definitely do it
One more thing: “Missourri” should only have one “r”.
Thanks Again
Thanks for the state_select plugin!
However, when I run script/plugin it installs your plug to /vendor/plugins/trunk
Other plugins I want to install (file_column) write to the same directory /vendor/plugins/trunk, overwriting your files.
Is this correct behavior? Shouldn’t the plugin install to something like /vendor/plugins/state_select ?
I’m a rails newb so I might be missing something here.
Thanks again for your hard work.
Daniel
Oakland, CA
Hi Daniel,
Please rename the trunk dir to state_select just after you install the plugin 😉