Modified to work with has one and has many relations
Merge pull request #37 from xavocinternational/patch-2

Modified to work with has one and has many relations