Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change documentation for collection.build and collection.create [ci-skip] #20652

Merged
merged 1 commit into from
Jun 27, 2015

Conversation

ankit1910
Copy link

No description provided.

@@ -1519,20 +1519,30 @@ conditions exists in the collection. It uses the same syntax and options as

##### `collection.build(attributes = {}, ...)`

The `collection.build` method returns one or more new objects of the associated type. These objects will be instantiated from the passed attributes, and the link through their foreign key will be created, but the associated objects will _not_ yet be saved.
The `collection.build` method returns a single or array of new objects of the associated type. The object(s) will be instantiated from the passed attributes, and the link through their foreign key will be created, but the associated objects will _not_ yet be saved.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"...returns a single object or array of objects for the associated type."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions:

  • "a single object or an array of"
  • "of the associated type"
  • no comma after "attributes"

"The collection.build method returns a single object or an array of new objects of the associated type. The object(s) will be instantiated with the passed attributes and the link through their foreign key will be created, but the associated objects will not yet be saved."

@ankit1910
Copy link
Author

@zzak @jonatack: change looks good?

@meinac
Copy link
Contributor

meinac commented Jun 22, 2015

@ankit1910 I can't see the final version, where is it?

@zzak
Copy link
Member

zzak commented Jun 27, 2015

@ankit1910 Thanks!

zzak pushed a commit that referenced this pull request Jun 27, 2015
Change documentation for collection.build and collection.create [ci-skip]
@zzak zzak merged commit e67386a into rails:master Jun 27, 2015
@ankit1910 ankit1910 deleted the change_doc branch October 11, 2015 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants