Class: JoofaqGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/joofaq/joofaq_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_faq_templatesObject



4
5
6
7
8
9
# File 'lib/generators/joofaq/joofaq_generator.rb', line 4

def copy_faq_templates
  copy_file "joofaq.yml", "db/faq.yml"
  copy_file "joofaq/index.html.erb", "app/views/faq/index.html.erb"
  copy_file "joofaq/_qapair.html.erb", "app/views/faq/_qapair.html.erb"
  copy_file "joofaq/_subtitle.html.erb", "app/views/faq/_subtitle.html.erb"
end

#create_routeObject



11
12
13
# File 'lib/generators/joofaq/joofaq_generator.rb', line 11

def create_route
  route "match '/faq' => 'Faq#index'"
end