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,507 of 197,085
Downloads: 18,339

Daily

Ranking: 87,723 of 197,066
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
81,428,256,062rake
37845,746,438activerecord
39833,699,686actionpack
285196,939,989sqlite3

Owners

#GravatarHandle
1iconka8725