Class: Bookable::Generators::ControllerGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Bookable::Generators::ControllerGenerator
- Defined in:
- lib/bookable/generators/bookable/controller_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate_bookable_controller ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/bookable/generators/bookable/controller_generator.rb', line 9 def generate_bookable_controller template "booking_controller.rb", "app/controllers/bookings_controller.rb" template "resource_controller.rb", "app/controllers/#{resource_name_underscore.pluralize}_controller.rb" route "resources :#{resource_name_underscore.pluralize} do\n" \ "\t resources :bookings\n" \ "\tend" end |