Module: Angular::Generators::ResourceHelpers

Included in:
ControllerGenerator, InstallGenerator
Defined in:
lib/generators/angular/resource_helpers.rb

Instance Method Summary collapse

Instance Method Details

#angular_pathObject



16
17
18
# File 'lib/generators/angular/resource_helpers.rb', line 16

def angular_path
	"#{assets_path}/javascripts/angular"
end

#angular_spec_pathObject



24
25
26
# File 'lib/generators/angular/resource_helpers.rb', line 24

def angular_spec_path
	"spec/javascripts/angular"
end

#angular_templates_pathObject



20
21
22
# File 'lib/generators/angular/resource_helpers.rb', line 20

def angular_templates_path
	"#{assets_path}/templates"
end

#application_nameObject



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_pathObject



12
13
14
# File 'lib/generators/angular/resource_helpers.rb', line 12

def assets_path
	"app/assets"
end