What is the difference between --skip-stylesheets and -no-stylesheets

I wanted to create a scaffold without style sheets, and I found these two flags: --skip-stylesheets , --no-stylesheets . What is the difference between the two?

+4
source share
1 answer

If you run rails g scaffold --help , it will display help information for this generator along with a list of options.

Some options have default values. For example, if you look

 -y, [--stylesheets] # Generate Stylesheets # Default: true 

By default, it is true. If you do not want to create style sheets, you can prefix the --no option to disable this particular option.

The skip-stylesheets parameter is defined in the [Execution Options] section as follows:

 -s, [--skip] # Skip files that already exist 

So, to answer your question:

--no-stylesheets does not generate stylesheets at all

--skip-stylesheets generates style sheets, but skips those that already exist.

+3
source

All Articles