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
Tag Archives: associations
Testing associations with factory girl
Associations are very important when we are working with relational databases. Writing relations in models is easy but when it comes testing them, it is a painful task. Factory girl associations makes this easy. Before going into details, lets get … 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
