Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between --skip-stylesheets and --no-stylesheets

I wanted to generate scaffold without stylesheets, and I found these two flags: --skip-stylesheets, --no-stylesheets. What's the difference between them?

like image 745
Marcin Doliwa Avatar asked Apr 12 '13 14:04

Marcin Doliwa


People also ask

Which are the 3 types of stylesheets available?

There are three types of CSS which are given below: Inline CSS. Internal or Embedded CSS. External CSS.

What are the different types of stylesheets?

We learned that style sheets come in three types, external, internal, and inline.

What is the difference between internal stylesheets and external stylesheets?

Internal CSS are the ones that we can write within the same file i.e the HTML code and CSS code are placed in the same file. External CSS are that we can write in a separate file than the html code i.e the HTML file is separate like(index. html) and CSS file is separate like(style. css).

What is the purpose of stylesheets?

A style sheet is a file which tells a browser how to render a page. There are even aural style sheets [coming up -1997] for telling a speech browser how to pronounce different tags. A current recommendation for style sheets is the "Cascading Style Sheets" (CSS) language.


1 Answers

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

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

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

You see it defaults to true. If you don't want to generate stylesheets, you can prefix the option with --no to disable that specific option.

The skip-stylesheets option is defined in the [Runtime options] section as follows:

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

So to answer your question:

--no-stylesheets doesn't generate stylesheets at all

--skip-stylesheets generates stylesheets but skips the ones that already exist.

like image 196
Christian-G Avatar answered Oct 12 '22 10:10

Christian-G