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: 60,299 of 193,188
Downloads: 18,162

Daily

Ranking: 66,334 of 193,154
Downloads: 3

Depended by

RankDownloadsName

Depends on

RankDownloadsName
81,329,290,503rake
36793,660,028activerecord
38782,189,070actionpack
279183,787,701sqlite3

Owners

#GravatarHandle
1iconka8725