Modification of get_or_build

Andrey Koleshko suggested changes to get_or_build 2012-11-04 22:44:37 UTC

What has changed?

Before After
Category <blank> Form Builders

The changes were rejected 2013-01-17 11:01:04 UTC

The current version looks like this:


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

Rubygem get_or_build

Total Downloads
Current Version
2012-03-25 00:00:00 UTC
First Release
2012-03-22 00:00:00 UTC
Depends on following gems
Depending Gems


Christoph Olszowka wrote 2013-01-17 11:01:02 UTC:

I don't think this project fits into the category of form builders as it's syntactic sugar for the controllers and not meant to ease rendering actual html forms.

Post a comment

Markdown supported

In order to continue, you must be signed in using your Github account.

If you're signing in using this account for the first time Github will ask for your permission to give access to your public user data to the Ruby Toolbox.

Although the Github Authorization page does not mention it, the request includes read-only access to your verified email address (user:email OAuth scope). This is neccessary so there's a way to notify you about comments, information about your accepted project edits and the like. You can review your notification settings on your account page once you're signed in.