Sha256: 0f28dfd8683ffa8b9adc375afc1706ec453a035a33cad6af6fcfc9259fe0d98d

Contents?: true

Size: 775 Bytes

Versions: 1

Compression:

Stored size: 775 Bytes

Contents

require 'rails/generators/base'
module RailsModularAdmin
  module Generators
    class ViewsGenerator < Rails::Generators::NamedBase
    desc "This generator copies over default templates for Modular Admin into your application."
    source_root File.expand_path('templates', __dir__)

      

      def copy_auth_layout
      	copy_file "auth.html.erb", "app/views/layouts/auth.html.erb"
      end

  	  def copy_login_view
        copy_file "login.html.erb", "app/views/devise/sessions/new.html.erb"
  	  end

      def copy_register_view
        copy_file "register.html.erb", "app/views/devise/registrations/new.html.erb"
      end

      def copy_recover_view
      	copy_file "recover.html.erb", "app/views/devise/registrations/new.html.erb"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_modular_admin-1.0.0 lib/generators/rails_modular_admin/views_generator.rb