Module: Initjs::Generators::ResourceHelpers
- Included in:
- AddGenerator, InstallGenerator
- Defined in:
- lib/generators/initjs/resource_helpers.rb
Instance Method Summary collapse
Instance Method Details
#application_name ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/generators/initjs/resource_helpers.rb', line 9 def application_name if defined?(Rails) && Rails.application Rails.application.class.name.split('::').first else "App" end end |
#application_path ⇒ Object
5 6 7 |
# File 'lib/generators/initjs/resource_helpers.rb', line 5 def application_path "app/assets/javascripts/#{application_name.underscore}" end |
#js_app_name ⇒ Object
17 18 19 |
# File 'lib/generators/initjs/resource_helpers.rb', line 17 def js_app_name application_name.camelize end |