Archive for September, 2006

What do you see a face or an Eskimo?

eskimo.jpg

September 28, 2006 at 7:15 am 11 comments

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

September 13, 2006 at 6:42 am 5 comments

Plugin: state_select, generate drop down selection box for states

I have wrote my first plugin(state_select). This plugin allows to create drop down list for states, same as country_select method in rails. I know this is not a big deal…

Curently it can generate state list for India, US, Canada, Australia and Spain(default is US).

Usage:

  • state_select(object, method, country='US', options = {}, html_options = {})

Return select and option tags for the given object and method, using state_options_for_select to generate the list of option tags.

  • state_options_for_select(selected = nil, country = 'US')

Returns a string of option tags for states in a country. Supply a state name as selected to have it marked as the selected option tag.

NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.

The svn repository can be found at http://opensvn.csie.org/state_select/trunk/

Install plugin by

script/plugin install http://opensvn.csie.org/state_select/trunk/

September 12, 2006 at 2:34 pm 15 comments

12 Balls Problem

You have 12 balls (of any kind), one ball either lighter or heavier than the other 11. A scale is provided to you but only three weighs are allowed. How can you possibly figure out which is the odd ball?

September 8, 2006 at 10:07 am 7 comments


Important Notice…

I have moved this blog to http://webonrails.com . I will continue posting at http://webonrails.com, not on https://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)

Recent Posts

Calender

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

Subscribe

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

del.icio.us

Feeds

Flickr Photos

Visitor’s Location

Blog Stats

  • 18,077 hits