Our Publications
About Us
Josh Software
Our passion is Ruby On Rails! We are an Indian company who believes that programming is an art.Our portfolio! -- Contact Us
Categories
- Case Studies (1)
- CMS (9)
- Radiant (9)
- General (24)
- Javascript (5)
- Mobile Development (1)
- Sencha (1)
- MongoDB (2)
- Ruby (45)
- Ruby on Rails (117)
- Conferences (14)
- Search (8)
- Tutorials (12)
Authors
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
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
