Class: Appointments::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Appointments::InstallGenerator
- Defined in:
- lib/generators/appointments/install/install_generator.rb
Instance Method Summary collapse
- #add_controller ⇒ Object
- #add_javascripts ⇒ Object
- #add_model ⇒ Object
- #add_routes ⇒ Object
- #add_stub_view ⇒ Object
- #add_stylesheets ⇒ Object
- #add_view ⇒ Object
Instance Method Details
#add_controller ⇒ Object
17 18 19 |
# File 'lib/generators/appointments/install/install_generator.rb', line 17 def add_controller template "appointments_controller.rb", "app/controllers/appointments_controller.rb" end |
#add_javascripts ⇒ Object
29 30 31 32 33 |
# File 'lib/generators/appointments/install/install_generator.rb', line 29 def add_javascripts template "jquery.ui.datepicker.min.js", "public/javascripts/jquery.ui.datepicker.min.js" template "jquery.ui.widget.min.js", "public/javascripts/jquery.ui.widget.min.js" template "appointment.js", "public/javascripts/appointment.js" end |
#add_model ⇒ Object
13 14 15 |
# File 'lib/generators/appointments/install/install_generator.rb', line 13 def add_model template "appointment.rb", "app/models/appointment.rb" end |
#add_routes ⇒ Object
8 9 10 11 |
# File 'lib/generators/appointments/install/install_generator.rb', line 8 def add_routes resources = "resources :appointments" route resources end |
#add_stub_view ⇒ Object
25 26 27 |
# File 'lib/generators/appointments/install/install_generator.rb', line 25 def add_stub_view template "index.html.erb", "app/views/appointments/index.html.erb" end |
#add_stylesheets ⇒ Object
35 36 37 |
# File 'lib/generators/appointments/install/install_generator.rb', line 35 def add_stylesheets template "jquery-ui-1.8.17.custom.css", "public/jquery-ui-1.8.17.custom.css" end |
#add_view ⇒ Object
21 22 23 |
# File 'lib/generators/appointments/install/install_generator.rb', line 21 def add_view template "new.html.erb", "app/views/appointments/new.html.erb" end |