Class: Nrb::Commands::Destroy
- Inherits:
-
InsideGroup
- Object
- Thor::Group
- InsideGroup
- Nrb::Commands::Destroy
- Defined in:
- lib/nrb/commands/destroy.rb
Instance Method Summary collapse
Methods inherited from InsideGroup
#check_inside?, desc_with_warning, source_root, warning
Instance Method Details
#generate_resource ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/nrb/commands/destroy.rb', line 25 def generate_resource remove_file target("#{name.underscore}.rb") # Also remove the *_create_resource migration if resource == 'model' migration_file = Dir["db/migrate/*create_#{name.underscore.pluralize}.rb"].first remove_file migration_file if migration_file end end |