# frozen_string_literal: true module MrCommon class ViewsGenerator < Rails::Generators::Base desc "Copy bare-bones view templates for overriding the ugly defaults that come with the engine." source_root File.expand_path("templates", __dir__) def copy_skeleton_views template_paths.each do |file| copy_file file, "app/views/#{file}" end end private def template_paths %w( mr_common/registrations/public/new.html.erb mr_common/registrations/success/index.html.erb mr_common/registration_mailer/confirmation.html.erb mr_common/registration_mailer/confirmation.text.erb ) end end end