Ticket #401 (closed defect: duplicate)

Opened 8 months ago

Last modified 7 months ago

Controller generation may create incorrect syntax in generated files

Reported by: mcs5..@drexel.edu Assigned to:
Priority: medium Milestone: The Future
Component: Generators Keywords:
Cc:

Description

Any parameters past the initial generator type and name arguments get passed as functions of the new controller. For example:

$ script/generate controller Items --test

This command causes a parsing error, namely that '--test' is an InvalidOption?, but still allows the creation of the file app/controllers/items.rb, which will look like this:

class Items < Application

  def --test
    render
  end
end

This file contains a syntax error.

Change History

02/11/08 12:48:48 changed by shayarne..@gmail.com

  • status changed from new to closed.
  • resolution set to duplicate.