Sha256: bac30ffe0dc6825f9c9703d0ef427ded9ef8abcc52efc0c87afde9f041a41109

Contents?: true

Size: 784 Bytes

Versions: 1

Compression:

Stored size: 784 Bytes

Contents

# frozen_string_literal: true

module MrCommon
  class AdminGenerator < Rails::Generators::Base
    source_root File.expand_path(MrCommon::Engine.root)

    def copy_skeleton_views
      template_paths.each do |file|
        copy_file file, file
      end
    end

    private

      def template_paths
        %w(
          app/controllers/mr_common/registrations/registrations_controller.rb
          app/views/mr_common/registrations/registrations/_form.html.erb
          app/views/mr_common/registrations/registrations/edit.html.erb
          app/views/mr_common/registrations/registrations/index.html.erb
          app/views/mr_common/registrations/registrations/new.html.erb
          app/views/mr_common/registrations/registrations/show.html.erb
        )
      end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mr_common-2.1.0 lib/generators/mr_common/admin/admin_generator.rb