Sha256: e49fc0e9531aed672f7ef5c982b29a447d0117941cd6170d425284c02fd50b70

Contents?: true

Size: 611 Bytes

Versions: 3

Compression:

Stored size: 611 Bytes

Contents

require "rails/generators/base"

module DuodealerApp
  module Generators
    class HomeControllerGenerator < Rails::Generators::Base
      source_root File.expand_path("../templates", __FILE__)

      def create_home_controller
        template "home_controller.rb", "app/controllers/home_controller.rb"
      end

      def create_home_index_view
        copy_file "index.html.erb", "app/views/home/index.html.erb"
      end

      def add_home_index_route
        route "root :to => 'home#index'"
      end

      def embedded_app?
        DuodealerApp.configuration.embedded_app?
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
duodealer_app-1.0.4 lib/generators/duodealer_app/home_controller/home_controller_generator.rb
duodealer_app-1.0.3 lib/generators/duodealer_app/home_controller/home_controller_generator.rb
duodealer_app-1.0.2 lib/generators/duodealer_app/home_controller/home_controller_generator.rb