Class: KisoThemes::Generators::LegalPagesGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
HandlerSupport
Defined in:
lib/generators/kiso_themes/legal_pages_generator.rb

Instance Method Summary collapse

Instance Method Details



17
18
19
20
21
22
# File 'lib/generators/kiso_themes/legal_pages_generator.rb', line 17

def copy_legal_pages
  ['terms_of_service_page', 'privacy_page'].each do |page_name|
    copy_file "views/frontend_pages/legal_pages/#{page_name}.html.#{handler}",
      "app/views/legal/#{page_name.gsub(/_page/, '')}.html.#{handler}"
  end
end

#create_controllerObject



13
14
15
# File 'lib/generators/kiso_themes/legal_pages_generator.rb', line 13

def create_controller
  invoke :controller, ['legal', ['privacy', 'terms_of_service']], skip: false, skip_routes: false, helper: false, test_framework: false, assets: false, template_engine: false
end