From eeefdfdfed518014abe01f4cd71b696259178ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien?= <53906613+aurum-ellt@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:44:10 +0100 Subject: [PATCH] Show the new recommendation to require and permit parameters --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index af3dac96..1cd4c06a 100644 --- a/index.html +++ b/index.html @@ -248,7 +248,7 @@
app/controllers/articles_controller.rb
private def article_params - params.require(:article).permit(:title, :content) + params.expect(article: [ :title, :content ]) end end {% endhighlight %}