Permalink
Browse files

Merge pull request #357 from rafaelgoulart/master

syntax highlight about Rails 4 strong parameters notation in README
  • Loading branch information...
2 parents c302307 + 94930cd commit 68dd475af291bb4bab378d43193411f9f053f10a @rafaelfranca rafaelfranca committed May 6, 2014
Showing with 5 additions and 3 deletions.
  1. +5 −3 README.md
View
@@ -711,9 +711,11 @@ end
Instead you can stick to a standard Rails 4 notation (as rails scaffold generates) and write:
- def widget_params
- params.require(:widget).permit(:permitted_field, :other_permitted_field)
- end
+```ruby
+def widget_params
+ params.require(:widget).permit(:permitted_field, :other_permitted_field)
+end
+```
In such case you should remove #permitted_params method because it has greater priority.

0 comments on commit 68dd475

Please sign in to comment.