Sha256: 0b1538b363237a35cd8c7c48fc8c71733dffe5b75c7ac1202d4f4f3737ad89e8
Contents?: true
Size: 971 Bytes
Versions: 47
Compression:
Stored size: 971 Bytes
Contents
# frozen_string_literal: true require 'rails/generators/base' module ShopifyApp module Generators class AddMarketingActivityExtensionGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) def generate_app_extension template("marketing_activities_controller.rb", "app/controllers/marketing_activities_controller.rb") generate_routes end private def generate_routes inject_into_file( 'config/routes.rb', optimize_indentation(routes, 2), after: "root :to => 'home#index'\n" ) end def routes <<~EOS resource :marketing_activities, only: [:create, :update] do patch :resume patch :pause patch :delete post :republish post :preload_form_data post :preview post :errors end EOS end end end end
Version data entries
47 entries across 47 versions & 2 rubygems