Sha256: f3f6a8698813debec050555b72db8ebc5fe982c81c76dbbbfb6027061db37c2e

Contents?: true

Size: 1004 Bytes

Versions: 1

Compression:

Stored size: 1004 Bytes

Contents

module Kakimasu
  module Generators
    class ViewsGenerator < Rails::Generators::Base
      puts "Creating views for you ..."
      # Sets root for more compact file copying
      source_root File.expand_path("../../../../app/views/kakimasu", __FILE__)

      # Copy all views to project folder for ability to edit them
      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
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kakimasu-1.0.0 lib/generators/kakimasu/views_generator.rb