Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rails/rails
...
head fork: rails/rails
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 20, 2013
@kjg kjg Don't generate a scaffold.css if no-assets 2e5f49d
@guilleiguaran guilleiguaran Merge pull request #9837 from kjg/no_scaffold_css_when_no_assets
Don't generate a scaffold.css when --no-assets is specified
f73c52c
View
4 railties/CHANGELOG.md
@@ -1,5 +1,9 @@
## Rails 4.0.0 (unreleased) ##
+* Don't generate a scaffold.css when --no-assets is specified
+
+ *Kevin Glowacz*
+
* Add support for generate scaffold password:digest
* adds password_digest attribute to the migration
View
1  railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb
@@ -10,6 +10,7 @@ class ScaffoldGenerator < ResourceGenerator # :nodoc:
class_option :stylesheet_engine, desc: "Engine for Stylesheets"
def handle_skip
+ @options = @options.merge(stylesheets: false) unless options[:assets]
@options = @options.merge(stylesheet_engine: false) unless options[:stylesheets]
end
View
2  railties/test/generators/scaffold_generator_test.rb
@@ -241,7 +241,7 @@ def test_scaffold_generator_on_revoke_does_not_mutilate_legacy_map_parameter
def test_scaffold_generator_no_assets
run_generator [ "posts", "--no-assets" ]
- assert_file "app/assets/stylesheets/scaffold.css"
+ assert_no_file "app/assets/stylesheets/scaffold.css"
assert_no_file "app/assets/javascripts/posts.js"
assert_no_file "app/assets/stylesheets/posts.css"
end

No commit comments for this range

Something went wrong with that request. Please try again.