diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2013-01-05 18:03:24 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2013-01-05 18:04:30 +0100 |
commit | 3d08614826e18e005818c7685b9bc4cdc28f77af (patch) | |
tree | aba656bc0c9ebecde9eabedd0bf38528db346b32 /railties/lib/rails | |
parent | 4017f6c7e6990e04d81fef943fd6bd6691e11f8f (diff) | |
download | rails-3d08614826e18e005818c7685b9bc4cdc28f77af.tar.gz rails-3d08614826e18e005818c7685b9bc4cdc28f77af.tar.bz2 rails-3d08614826e18e005818c7685b9bc4cdc28f77af.zip |
No need to give an example where there is generated code right there to serve as the example
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb b/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb index 2512ce0af1..e11d357314 100644 --- a/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb +++ b/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb @@ -104,11 +104,7 @@ class <%= controller_class_name %>Controller < ApplicationController @<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %> end - # Use this method to whitelist the permissible parameters. Example: - # params.require(:person).permit(:name, :age) - # - # Also, you can specialize this method with per-user checking of permissible - # attributes. + # Never trust parameters from the scary internet, only allow the white list through. def <%= "#{singular_table_name}_params" %> <%- if attributes_names.empty? -%> params[<%= ":#{singular_table_name}" %>] |