Class: Regulate::Generators::StrapGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Regulate::Generators::StrapGenerator
- Defined in:
- lib/generators/regulate/strap_generator.rb
Overview
Class lifted from Devise. Thanks josevalim!
Instance Method Summary collapse
-
#copy_js ⇒ Object
Copy over our JS.
-
#copy_views ⇒ Object
Copy over our view files.
-
#copy_yml ⇒ Object
Copy over the repo config YAML file.
Instance Method Details
#copy_js ⇒ Object
Copy over our JS
27 28 29 |
# File 'lib/generators/regulate/strap_generator.rb', line 27 def copy_js template "public/javascripts/regulate_admin.js", "public/javascripts/regulate_admin.js" end |
#copy_views ⇒ Object
Copy over our view files
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/generators/regulate/strap_generator.rb', line 15 def copy_views case [:template_engine].to_s when "haml" verify_haml_existence verify_haml_version create_and_copy_haml_views else directory "app/views/regulate", "app/views/regulate" end end |
#copy_yml ⇒ Object
Copy over the repo config YAML file
32 33 34 |
# File 'lib/generators/regulate/strap_generator.rb', line 32 def copy_yml template "config/regulate.yml", "config/regulate.yml" end |