Class: Rails::Generator::Commands::Destroy
- Inherits:
-
Object
- Object
- Rails::Generator::Commands::Destroy
- Defined in:
- lib/startups.rb
Instance Method Summary collapse
Instance Method Details
#generate(name) ⇒ Object
68 69 70 71 |
# File 'lib/startups.rb', line 68 def generate(name) logger.destroy "rewinding additional generator: #{name}" Rails::Generator::Scripts::Destroy.new.run([name]) end |
#rm(relative_destination) ⇒ Object
73 74 75 |
# File 'lib/startups.rb', line 73 def rm(relative_destination) logger.gone "can't replace rm'd file: #{relative_destination}" end |
#route(route_options) ⇒ Object
61 62 63 64 65 66 |
# File 'lib/startups.rb', line 61 def route() logger.remove_route () # to_remove = "\n #{route_code(route_options)}" to_remove = "\n #{route_code()}\n" gsub_file 'config/routes.rb', to_remove, '' end |