Scaffold destroy doesn't remove scaffolds.css.scss #6381

Closed
emilyellison986 opened this Issue May 18, 2012 · 5 comments

Projects

None yet

3 participants

@emilyellison986

As shown below, rails generate creates scaffolds.css.scss, but rails destroy does not remove it.

~/Dev/mwf/MWF-ShopApp: rails g scaffold Poop
invoke active_record
create db/migrate/20120518151908_create_poops.rb
create app/models/poop.rb
invoke test_unit
create test/unit/poop_test.rb
create test/fixtures/poops.yml
route resources :poops
invoke scaffold_controller
create app/controllers/poops_controller.rb
invoke erb
create app/views/poops
create app/views/poops/index.html.erb
create app/views/poops/edit.html.erb
create app/views/poops/show.html.erb
create app/views/poops/new.html.erb
create app/views/poops/_form.html.erb
invoke test_unit
create test/functional/poops_controller_test.rb
invoke helper
create app/helpers/poops_helper.rb
invoke test_unit
create test/unit/helpers/poops_helper_test.rb
invoke assets
invoke coffee
create app/assets/javascripts/poops.js.coffee
invoke scss
create app/assets/stylesheets/poops.css.scss
invoke scss
create app/assets/stylesheets/scaffolds.css.scss

~/Dev/mwf/MWF-ShopApp: rails destroy scaffold Poop
invoke active_record
remove db/migrate/20120518151908_create_poops.rb
remove app/models/poop.rb
invoke test_unit
remove test/unit/poop_test.rb
remove test/fixtures/poops.yml
route resources :poops
invoke scaffold_controller
remove app/controllers/poops_controller.rb
invoke erb
remove app/views/poops
remove app/views/poops/index.html.erb
remove app/views/poops/edit.html.erb
remove app/views/poops/show.html.erb
remove app/views/poops/new.html.erb
remove app/views/poops/_form.html.erb
invoke test_unit
remove test/functional/poops_controller_test.rb
invoke helper
remove app/helpers/poops_helper.rb
invoke test_unit
remove test/unit/helpers/poops_helper_test.rb
invoke assets
invoke coffee
remove app/assets/javascripts/poops.js.coffee
invoke scss
remove app/assets/stylesheets/poops.css.scss
invoke scss

@ghost
ghost commented May 18, 2012

I was responsible for generating a "Poop" scaffold, by the way. Emily would have made a much more elegant scaffold.

@carlosantoniodasilva

It's actually asserted in the tests that this particular asset is not removed.

I think it's ok for it to not be removed, because you may have generated more than one scaffold already, and you may be relying on it now. If a second scaffold goes there and remove the file when you run the destroy command, the app would be left in an "inconsistent state".

@spastorino
Member

Yep it's not an issue for the reason explained by @carlosantoniodasilva
@emilyellison986 are you fine with that? can we close the issue?

Thanks for reporting it anyway :)

@emilyellison986

Yes, that makes sense now. Thanks!

@carlosantoniodasilva

Thanks for reporting :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment