I created a new fresh project in Rails 7, and whenever I use the generating script
rails generate scaffold or rails generate controller, all of the generated files are created except the css/scss.
Apparently, I'm not the only one with the issue
There's a claim on that link that in Rails 7, the CSS files are not generated by default.
Is there a way to force rails CLI to generate styles on the scaffold command?
And in anyway, why did they make that change in Rails 7, if the claim is true?
Here's the script I ran and the output in my given console:
rails g scaffold WhyNoCss dont_work:boolean
invoke active_record
create db/migrate/20220215221757_create_why_no_csses.rb
create app/models/why_no_css.rb
invoke test_unit
create test/models/why_no_css_test.rb
create test/fixtures/why_no_csses.yml
invoke resource_route
route resources :why_no_csses
invoke scaffold_controller
create app/controllers/why_no_csses_controller.rb
invoke erb
create app/views/why_no_csses
create app/views/why_no_csses/index.html.erb
create app/views/why_no_csses/edit.html.erb
create app/views/why_no_csses/show.html.erb
create app/views/why_no_csses/new.html.erb
create app/views/why_no_csses/_form.html.erb
create app/views/why_no_csses/_why_no_css.html.erb
invoke resource_route
invoke test_unit
create test/controllers/why_no_csses_controller_test.rb
create test/system/why_no_csses_test.rb
invoke helper
create app/helpers/why_no_csses_helper.rb
invoke test_unit
invoke jbuilder
create app/views/why_no_csses/index.json.jbuilder
create app/views/why_no_csses/show.json.jbuilder
create app/views/why_no_csses/_why_no_css.json.jbuilder
rails g scss:assets [scaffold NAME]. This would generate an empty style file in theapp/assets/stylesheetsdirectory. You'll still have to manually link the style to the views to. So ,again, why would I use this command when I can just create the stylesheet file in the code editor?