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: 59,953 of 192,071
Downloads: 18,083

Daily

Ranking: 86,098 of 192,060
Downloads: 3

Depended by

RankDownloadsName

Depends on

RankDownloadsName
81,290,393,700rake
36778,076,182activerecord
37766,799,617actionpack
279179,320,202sqlite3

Owners

#GravatarHandle
1iconka8725