Skip to content

Commit bfac9c4

Browse files
committed
Add attributes list to ScaffoldController to use it in parameters sanitization method on controller
1 parent 04af6f6 commit bfac9c4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class ScaffoldControllerGenerator < NamedBase
1010
class_option :orm, :banner => "NAME", :type => :string, :required => true,
1111
:desc => "ORM to generate the controller for"
1212

13+
argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
14+
1315
def create_controller_files
1416
template "controller.rb", File.join('app/controllers', class_path, "#{controller_file_name}_controller.rb")
1517
end

0 commit comments

Comments
 (0)