Sha256: 7c7df52df600fb09189c8e07bc131aecc441efe39f186ef6b4bff89e89495146

Contents?: true

Size: 607 Bytes

Versions: 9

Compression:

Stored size: 607 Bytes

Contents

require 'rails/generators/base'

module ShopifyApp
  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?
        ShopifyApp.configuration.embedded_app?
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
shopify_app-13.0.0 lib/generators/shopify_app/home_controller/home_controller_generator.rb
shopify_app-12.0.7 lib/generators/shopify_app/home_controller/home_controller_generator.rb
shopify_app-12.0.6 lib/generators/shopify_app/home_controller/home_controller_generator.rb
shopify_app-12.0.5 lib/generators/shopify_app/home_controller/home_controller_generator.rb
shopify_app-12.0.4 lib/generators/shopify_app/home_controller/home_controller_generator.rb
shopify_app-12.0.3 lib/generators/shopify_app/home_controller/home_controller_generator.rb
shopify_app-12.0.2 lib/generators/shopify_app/home_controller/home_controller_generator.rb
shopify_app-12.0.1 lib/generators/shopify_app/home_controller/home_controller_generator.rb
shopify_app-12.0.0 lib/generators/shopify_app/home_controller/home_controller_generator.rb