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: 62,178 of 199,228
Downloads: 18,437

Daily

Ranking: 62,963 of 199,184
Downloads: 7

Depended by

RankDownloadsName

Depends on

RankDownloadsName
71,480,270,976rake
37876,949,277activerecord
40865,018,827actionpack
287204,093,631sqlite3

Owners

#GravatarHandle
1iconka8725