diff --git a/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb
index <HASH>..<HASH> 100644
--- a/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb
+++ b/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb
@@ -10,7 +10,7 @@ module Rails
       class_option :stylesheet_engine, desc: "Engine for Stylesheets"
 
       def handle_skip
-        @options = @options.merge(stylesheet_engine: false) if !options[:stylesheets]
+        @options = @options.merge(stylesheet_engine: false) unless options[:stylesheets]
       end
 
       hook_for :scaffold_controller, required: true
Changed if ! to unless