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,553 of 183,477
Downloads: 15,304

Daily

Ranking: 63,432 of 183,470
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
10969,073,546rake
35604,924,275activerecord
38596,725,118actionpack
259143,118,777sqlite3

Owners

#GravatarHandle
1iconka8725