Categories: None [Edit]

get_or_build

https://rubygems.org/gems/get_or_build
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

Total

Ranking: 58,936 of 188,317
Downloads: 17,891

Daily

Ranking: 61,414 of 188,299
Downloads: 3

Depended by

RankDownloadsName

Depends on

RankDownloadsName
101,190,757,019rake
36733,883,063activerecord
37723,299,122actionpack
275169,331,163sqlite3

Owners

#GravatarHandle
1iconka8725