Patch #4609

Plugin generators should display help if no parameter is given

Added by Jean-Baptiste Barth almost 8 years ago. Updated over 7 years ago.

Status:ClosedStart date:2010-01-19
Priority:LowDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Plugin API
Target version:0.9.4

Description

I was sure I reported this before but cannot find the issue here on redmine.org...

In most (all?) standard generators, if no parameter is given, the help is displayed. I often rely on this when generating models/controllers, but I get an error with 2 redmine generators :

% ruby script/generate redmine_plugin_model
undefined method `underscore' for nil:NilClass
% ruby script/generate redmine_plugin_controller
undefined method `underscore' for nil:NilClass

OR (on an other machine) :
% ruby script/generate redmine_plugin_controller
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.underscore

I leave a tiny, tiny patch.

NB: redmine_plugin is not affected by such a bug since "super" is called at the beginning of the initialize() method.

redmine_generators_nil_underscore.diff Magnifier (1.41 KB) Jean-Baptiste Barth, 2010-01-19 13:10

Associated revisions

Revision 3514
Added by Jean-Philippe Lang over 7 years ago

Fixed: Plugin generators should display help if no parameter is given (#4609).

History

#1 Updated by Jean-Philippe Lang over 7 years ago

  • Status changed from New to Resolved
  • Assignee changed from Eric Davis to Jean-Philippe Lang
  • Target version set to 0.9.4

Committed in r3514, thanks.

#2 Updated by Jean-Philippe Lang over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF