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

Rename fields_for to params_for #98

Merged
merged 1 commit into from
Mar 4, 2016

Conversation

paulcsmith
Copy link
Contributor

This reads much more nicely IMO

post comment_path(conn, :create), params_for(:comment)

assert Comment.changeset(%Comment{}, params_for(:comment)).valid?

@derekprior
Copy link
Contributor

fields_for sounds kind of rails-form-buildery to me. I've only ever used it for controller params or something similar. That's also how I've used attributes_for in FG.

@paulcsmith
Copy link
Contributor Author

Thanks, @derekprior. That brings up a point, should it be attributes_for like FG, or params_for? Personally I'm partial to params_for because it's a bit more concise and easy to type, and I think it's just as clear. What do you think?

@paulcsmith paulcsmith force-pushed the ps-96-fields-for-to-params-for branch from b640e14 to f6285d2 Compare March 4, 2016 15:32
@paulcsmith paulcsmith merged commit f6285d2 into master Mar 4, 2016
@paulcsmith paulcsmith deleted the ps-96-fields-for-to-params-for branch March 4, 2016 15:37
@paulcsmith paulcsmith mentioned this pull request Jun 24, 2016
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.

2 participants