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,562 of 187,239
Downloads: 17,269

Daily

Ranking: 46,216 of 187,224
Downloads: 8

Depended by

RankDownloadsName

Depends on

RankDownloadsName
101,151,901,046rake
36711,658,717activerecord
38701,571,833actionpack
274163,773,486sqlite3

Owners

#GravatarHandle
1iconka8725