Lib file state_select.rb


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://opensvn.csie.org/state_select/trunk/lib/state_select.rb
Feedback please….

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts
What do you see a face or an Eskimo?
Plugin: state_select, generate drop down selection box for states

Reader Comments

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 ;-)

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.