Skip to content


Rails destroy command #365

btbinhtran opened this Issue · 4 comments

3 participants


Implement a tower destroy command to delete created models, controllers, helpers, and tests that are generated by the generate command.


I know in chat I said I didn't know where to start, but on this actually, I took a look and this is where I'd start on implementing this :

@viatropos will be able to give you better guidance, but this is where I'd start, specifically looking at how is implemented, since you'll be essentially reversing this process.


I agree edubkendo. There is just one concern that I read in the code comments that said the commands would be switched from classes to their own functions. I could start by making a destroy class, but not sure it will add more work for migrating the Command classes to be only separate functions. My guess is that this refactor improves the commands run speed.


My gut instinct would be to go ahead and implement it. I dont know when the proposed refactor will occur, but it is probably not in the immediate future. Tower.js has a long to-do list. Also, if you go ahead and implement "destroy", it will be easy to refactor, vs. being unwritten and needing to be written from scratch. Having the feature written, even if it requires refactoring later, would seem to me preferrable to not having it at all.

Tower.js member

Will include this in 0.5.0, it will be super optimized :). An early version is here: (but it's going to move soon to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.