diff options
author | Robin Dupret <robin.dupret@gmail.com> | 2014-12-26 17:55:23 +0100 |
---|---|---|
committer | Robin Dupret <robin.dupret@gmail.com> | 2014-12-26 18:08:44 +0100 |
commit | aff03e71b4a9d5b0d9190c52ecded79f44e937ce (patch) | |
tree | 1cb0e320353446c35d2ae7bb5b5c2ea2b549bbb4 /guides/source/generators.md | |
parent | 9545041fdbbd7b96eceb42fe4364b92e173151df (diff) | |
download | rails-aff03e71b4a9d5b0d9190c52ecded79f44e937ce.tar.gz rails-aff03e71b4a9d5b0d9190c52ecded79f44e937ce.tar.bz2 rails-aff03e71b4a9d5b0d9190c52ecded79f44e937ce.zip |
Update guides regarding the extension changes
With rails/coffee-rails#61 (and #17241), the `.coffee` extension is
favoured over `.js.coffee`. Respectively, with rails/sass-rails#271
`.scss` and `.sass` are favoured over `.css.scss` and `.css.sass`.
Let's update the documentation to reflect that.
[ci skip]
Diffstat (limited to 'guides/source/generators.md')
-rw-r--r-- | guides/source/generators.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/guides/source/generators.md b/guides/source/generators.md index be513dc0ef..05bf07b4c8 100644 --- a/guides/source/generators.md +++ b/guides/source/generators.md @@ -199,11 +199,11 @@ $ bin/rails generate scaffold User name:string create app/views/users/show.json.jbuilder invoke assets invoke coffee - create app/assets/javascripts/users.js.coffee + create app/assets/javascripts/users.coffee invoke scss - create app/assets/stylesheets/users.css.scss + create app/assets/stylesheets/users.scss invoke scss - create app/assets/stylesheets/scaffolds.css.scss + create app/assets/stylesheets/scaffolds.scss ``` Looking at this output, it's easy to understand how generators work in Rails 3.0 and above. The scaffold generator doesn't actually generate anything, it just invokes others to do the work. This allows us to add/replace/remove any of those invocations. For instance, the scaffold generator invokes the scaffold_controller generator, which invokes erb, test_unit and helper generators. Since each generator has a single responsibility, they are easy to reuse, avoiding code duplication. @@ -409,7 +409,7 @@ $ bin/rails generate scaffold Comment body:text create app/views/comments/show.json.jbuilder invoke assets invoke coffee - create app/assets/javascripts/comments.js.coffee + create app/assets/javascripts/comments.coffee invoke scss ``` |