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,484 of 183,127
Downloads: 15,229

Daily

Ranking: 74,510 of 183,106
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
10954,475,095rake
35596,341,077activerecord
38588,365,328actionpack
253141,575,949sqlite3

Owners

#GravatarHandle
1iconka8725