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

Blogger: Unclear section "Fragile Controllers" #1258

Open
berndbausch opened this issue Sep 4, 2019 · 0 comments
Open

Blogger: Unclear section "Fragile Controllers" #1258

berndbausch opened this issue Sep 4, 2019 · 0 comments

Comments

@berndbausch
Copy link

The section states that the controller knows too much about the model. I understand this as "it knows that the parameters include :title and :body". For this reason, we just copy the entire params hash into the @Article, without worrying about its content.

However, for security reasons, :title and :body must be permitted explicitly. In my eyes, the controller still knows about these parameters, even though permission is "hidden away" in a separate class. So, the controller remains fragile.

In short, I am unconvinced by the "fragile controllers" argument made in this section. Why don't we just copy :title and :body explicitly.

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

No branches or pull requests

1 participant