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: 61,902 of 198,430
Downloads: 18,380

Daily

Ranking: 89,752 of 198,401
Downloads: 1

Depended by

RankDownloadsName

Depends on

RankDownloadsName
81,462,600,952rake
37866,211,346activerecord
40854,044,273actionpack
285201,634,282sqlite3

Owners

#GravatarHandle
1iconka8725