Monthly Archives: November 2009

Passing commandline parameter (arguments) to ruby file using optparser

Ruby file accepts from command prompt in the form of array. Passing parameters ruby input.rb TOI DH TimesNew Accessing parameters # input.rb p ARGV # => [“TOI”, “DH”, “TimesNew”] p ARGV[0] # => “TOI” p ARGV[1] # => “DH” Optparser … Continue reading

Posted in Ruby | Tagged | Leave a comment

How to get all associted models of rails model

I have Site Model and i wanted to find all associated models of Site model which are having belongs_to relationship.After doing lot headache, here is the solution i found has_many models of Site Model Site.reflect_on_all_associations.map{|mac| mac.class_name if mac.macro==:has_many}.compact=> [“Layout”, “User”, … Continue reading

Posted in Ruby on Rails | Tagged | Leave a comment

Cricket challenge flash game

Advanced cricket flash game http://img.bollywoodsargam.com/games/files/game_4f2a798477213b30a4802e716e31a9a6.swf

| Leave a comment

Flash games

3rd worm game———————-http://www.layoutshack.net/games/puzzle/1.swf Flash Puzzle Games  Racing Game———————-  http://www.layoutshack.net/games/racing/2.swf Flash Racing Games

| Leave a comment

Gravity Master Game Challenge

Collect all rotating circles with the black ball. You can move the ball by drawing shapes with mouse and using physics. The ways of completing a level is only limited by your imagination and line limit. Complete 15 levels to … Continue reading

| Leave a comment

Upgrading openoffice in ubuntu interpid

Follow simple steps defined in this post for smooth upgrade of openoffice in linux. click here

Posted in General | Tagged , | Leave a comment

bundling gems in rails application

Gem Bundling is basically used to maintain all required gems at your application level.It downloads necessary gems and maintain it under “/vender/gems” directory.Its very easy to use gem bundle. 1. Insatll gemcutter gem ( Its gem hosting ) gem install … Continue reading

Posted in Ruby on Rails | Tagged , , , | Leave a comment