Class: Kakimasu::Generators::ViewsGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_viewsObject

Copy all views to project folder for ability to edit them



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/generators/kakimasu/views_generator.rb', line 9

def copy_views
  copy_file "home/index.html.erb", "app/views/kakimasu/home/index.html.erb"
  copy_file "keys/index.html.erb", "app/views/kakimasu/keys/index.html.erb"
  copy_file "translations/index.html.erb", "app/views/kakimasu/translations/index.html.erb"
  copy_file "translations/edit.html.erb", "app/views/kakimasu/translations/edit.html.erb"
  copy_file "shared/_navbar.html.erb", "app/views/kakimasu/shared/_navbar.html.erb"
  puts ''
  puts '***********************************'
  puts 'Views was successfully generated!'   # Success message
  puts '***********************************'
end