Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use the `--helper` flag in a rails 3 controller generator?

The documentation from rails generate controller says:

[--helper]                # Indicates when to generate helper
                          # Default: true

Now, it doesn't specify how to indicate a value. So, since the default is true, that means that excluding it won't indicate false, because… true is the default. So it must either be --helper=false or --helper false, but I tried both, and they both resulted in error false [not found]

The good news is that it did not generate a helper, because it was confused, so I still got the result I wanted :)

like image 541
John Bachir Avatar asked Dec 10 '10 02:12

John Bachir


1 Answers

For the boolean options you can set it to false by prepending a --no_

Example:

rails generate controller book --no_helper

like image 81
nimblegorilla Avatar answered Sep 27 '22 16:09

nimblegorilla