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,595 of 186,995
Downloads: 16,492

Daily

Ranking: 37,884 of 186,959
Downloads: 17

Depended by

RankDownloadsName

Depends on

RankDownloadsName
101,129,028,222rake
36698,603,704activerecord
38688,659,810actionpack
276161,097,927sqlite3

Owners

#GravatarHandle
1iconka8725