Class: Cms::Generators::PortletGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/cms/portlet/portlet_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_helperObject



13
14
15
# File 'lib/generators/cms/portlet/portlet_generator.rb', line 13

def create_helper
  template 'portlet_helper.rb', File.join('app/portlets/helpers', class_path, "#{portlet_file_name}_helper.rb")
end

#create_portletObject



9
10
11
# File 'lib/generators/cms/portlet/portlet_generator.rb', line 9

def create_portlet
  template 'portlet.rb', File.join('app/portlets', class_path, "#{portlet_file_name}.rb")
end

#create_testsObject



22
23
24
# File 'lib/generators/cms/portlet/portlet_generator.rb', line 22

def create_tests
  template 'unit_test.erb', File.join('test/unit/portlets', "#{portlet_file_name}_test.rb")
end

#create_viewsObject



17
18
19
20
# File 'lib/generators/cms/portlet/portlet_generator.rb', line 17

def create_views
  template '_form.html.erb', File.join('app/views/portlets/', file_name, "_form.html.erb")
  template 'render.html.erb', File.join('app/views/portlets/', file_name, "render.html.erb")
end