Sha256: c0837db6a22f049f878e30d8c878de8534f54588599e57bba83509a276fdef22

Contents?: true

Size: 536 Bytes

Versions: 1

Compression:

Stored size: 536 Bytes

Contents

# frozen_string_literal: true

module MrCommon
  class ViewsGenerator < Rails::Generators::Base
    desc "Copy views into the host app for customization."

    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/views/mr_common/registrations/public/new.html.erb
          app/views/mr_common/registrations/success/index.html.erb
        )
      end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mr_common-2.0.0 lib/generators/mr_common/views/views_generator.rb