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

Could we deprecate nested attributes? #959

Closed
justinfrench opened this issue Jul 14, 2013 · 1 comment
Closed

Could we deprecate nested attributes? #959

justinfrench opened this issue Jul 14, 2013 · 1 comment
Labels

Comments

@justinfrench
Copy link
Member

One of the features I most disagreed with in Rails and regret in Formtastic is nested attributes. I believe they create complex coupling between the form and it's underlying models that's unnecessary.

Best practice is to build a "presenter" model that presents the multiple underlying models as one for the purposes of the controllers and views, so I feel this should be encouraged and eventually enforced in Formtastic.

Before this, we would need to provide a really solid example (perhaps a "model" that can be inherited from, if no suitable libraries exist?).

@twalpole
Copy link
Contributor

My issue with this is that every beginning rails tutorial uses nested attributes, so not supporting them is going to open a bunch of "why no support for nested attributes?" issues. If rails deprecated support for it in say strong parameters,then I'd say fine, but as it is I vote for keeping the support in formtastic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants