Sha256: 75bce41a48b31b09df3f86a5c1d2c7ece804c80c312bca3e842216502691b1a6

Contents?: true

Size: 1.74 KB

Versions: 1

Compression:

Stored size: 1.74 KB

Contents

class AdminHelp::InstallGenerator < ::Rails::Generators::Base
  include Rails::Generators::Migration
  source_root File.expand_path('../templates', __FILE__)
  desc 'Copy templates for admin scaffold controller.'

  def install
    copy_file File.expand_path('../templates/app/views/layouts/admin_help.html.erb', __FILE__), 'app/views/layouts/admin_help.html.erb'
    copy_file File.expand_path('../templates/app/views/layouts/flash.html.erb', __FILE__), 'app/views/layouts/flash.html.erb'
    copy_file File.expand_path('../templates/app/views/layouts/header.html.erb', __FILE__), 'app/views/layouts/header.html.erb'
    copy_file File.expand_path('../templates/app/views/layouts/left_nav.html.erb', __FILE__), 'app/views/layouts/left_nav.html.erb'
    copy_file File.expand_path('../templates/app/controllers/admin/home_controller.rb', __FILE__), 'app/controllers/admin/home_controller.rb'
    copy_file File.expand_path('../templates/app/views/admin/home/index.html.erb', __FILE__), 'app/views/admin/home/index.html.erb'
    copy_file File.expand_path('../templates/config/routes.rb', __FILE__), 'config/routes.rb'
    copy_file File.expand_path('../templates/config/initializers/locale.rb', __FILE__), 'config/initializers/locale.rb'
    copy_file File.expand_path('../templates/config/locales/models/en.models.yml', __FILE__), 'config/locales/models/en.models.yml'
    copy_file File.expand_path('../templates/config/locales/models/zh-cn.models.yml', __FILE__), 'config/locales/models/zh-cn.models.yml'
    copy_file File.expand_path('../templates/config/locales/views/en.common.yml', __FILE__), 'config/locales/views/en.common.yml'
    copy_file File.expand_path('../templates/config/locales/views/zh-cn.common.yml', __FILE__), 'config/locales/views/zh-cn.common.yml'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
admin_help-0.1.5 lib/generators/admin_help/install_generator.rb