Class: Bandit::Generators::DashboardGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Bandit::Generators::DashboardGenerator
- Defined in:
- lib/generators/bandit/dashboard_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_assets ⇒ Object
18 19 20 21 |
# File 'lib/generators/bandit/dashboard_generator.rb', line 18 def copy_assets directory 'dashboard/js', 'public/javascripts/bandit' directory 'dashboard/css', 'public/stylesheets/bandit' end |
#copy_controller ⇒ Object
8 9 10 |
# File 'lib/generators/bandit/dashboard_generator.rb', line 8 def copy_controller copy_file 'bandit_controller.rb', 'app/controllers/bandit_controller.rb' end |
#copy_view ⇒ Object
12 13 14 15 16 |
# File 'lib/generators/bandit/dashboard_generator.rb', line 12 def copy_view directory 'dashboard/view', 'app/views/bandit' copy_file 'dashboard/bandit.html.erb', 'app/views/layouts/bandit.html.erb' directory 'dashboard/helpers', 'app/helpers' end |
#message ⇒ Object
23 24 25 26 |
# File 'lib/generators/bandit/dashboard_generator.rb', line 23 def say "\n\tNow, add the following to your config/routes.rb file:" say "\t\tresources :bandit\n\n" end |