Lib file state_select.rb

September 13, 2006

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….

Entry Filed under: Ruby, RubyonRails, rails. .

5 Comments Add your own

  • 1. Garth  |  October 24, 2006 at 2:11 pm

    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!

    Reply
  • 2. Garth  |  October 24, 2006 at 5:26 pm

    Also missed Alaska and need to sort the US state names properly

    Reply
  • 3. Akhil Bansal  |  October 25, 2006 at 4:26 am

    Thanks Garth,
    I will definitely do it

    Reply
  • 4. Garth  |  October 25, 2006 at 1:42 pm

    One more thing: “Missourri” should only have one “r”.

    Reply
  • 5. Akhil Bansal  |  October 31, 2006 at 3:46 pm

    Thanks Again

    Reply

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Important Notice…

I have moved this blog to http://webonrails.com . I will continue posting at http://webonrails.com, not on http://webonrails.wordpress.com.

Kindly update your book marks to http://webonrails.com

and http://webonrails.com/feed .

I am really very sorry for inconvenience.

Comming Soon….

Domain for Sale

TheRailsHosting.com


(Contact me)

c

Top Posts

Recent Posts

Recent Comments

jyoti on Ruby On Rails India
extessBob on My new HP Pavillion DV2117…
clexmases on My new HP Pavillion DV2117…
i can haz ajax? on Uploading files using AJA…
Peter on Plugin: NumbersToWords

rails

Ruby

RubyonRails

Calender

September 2006
M T W T F S S
« Aug   Oct »
 123
45678910
11121314151617
18192021222324
252627282930  

Archives

Subscribe

  • Add to Google
  • Subscribe in NewsGator Online
  • Subscribe with Bloglines
  • WebOnRails on feedburner
  • technorati

del.icio.us

Feeds

Flickr Photos

Don't Forget

Helmsdale River

Rainy little dockside

More Photos

Visitor’s Location

Spam Blocked

Blog Stats