Module: Angular::Generators::ResourceHelpers
- Included in:
- ControllerGenerator, InstallGenerator
- Defined in:
- lib/generators/angular/resource_helpers.rb
Instance Method Summary collapse
- #angular_path ⇒ Object
- #angular_spec_path ⇒ Object
- #angular_templates_path ⇒ Object
- #application_name ⇒ Object
- #assets_path ⇒ Object
Instance Method Details
#angular_path ⇒ Object
16 17 18 |
# File 'lib/generators/angular/resource_helpers.rb', line 16 def angular_path "#{assets_path}/javascripts/angular" end |
#angular_spec_path ⇒ Object
24 25 26 |
# File 'lib/generators/angular/resource_helpers.rb', line 24 def angular_spec_path "spec/javascripts/angular" end |
#angular_templates_path ⇒ Object
20 21 22 |
# File 'lib/generators/angular/resource_helpers.rb', line 20 def angular_templates_path "#{assets_path}/templates" end |
#application_name ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/generators/angular/resource_helpers.rb', line 4 def application_name if defined?(Rails) && Rails.application Rails.application.class.name.split('::').first else "application" end end |
#assets_path ⇒ Object
12 13 14 |
# File 'lib/generators/angular/resource_helpers.rb', line 12 def assets_path "app/assets" end |