Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
emilyellison opened this issue May 18, 2012 · 5 comments
Closed

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

emilyellison opened this issue May 18, 2012 · 5 comments
Labels

Comments

@emilyellison
Copy link

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
Copy link

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
Copy link
Member

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
Copy link
Contributor

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 :)

@emilyellison
Copy link
Author

Yes, that makes sense now. Thanks!

@carlosantoniodasilva
Copy link
Member

Thanks for reporting :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants