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,049 of 196,106
Downloads: 18,317

Daily

Ranking: 60,696 of 196,079
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
81,393,995,228rake
37826,698,318activerecord
38814,744,699actionpack
281192,385,988sqlite3

Owners

#GravatarHandle
1iconka8725