get_or_build (0.0.3)

Andrey Koleshko
2012-03-25T01:05:35Z

Provides method which allows get or build belongs_to or has_one association

Assume user belongs_to company and you want to get company object within one method call. You can do it like this: user.company_or_build