Sha256: 5445174a173a50deebbd819412e8fafe01704b8bbe3aeb656d8b042c7b2427ce

Contents?: true

Size: 625 Bytes

Versions: 1

Compression:

Stored size: 625 Bytes

Contents

module Georgia
  module Mailer
    module Generators
      class InstallGenerator < ::Rails::Generators::Base

        def mount_engine
          route "mount Georgia::Mailer::Engine => '/mailer'"
        end

        def run_migrations
          rake "railties:install:migrations"
          rake "db:migrate"
        end

        def create_index
          Georgia::Mailer::Message.__elasticsearch__.indices.delete! Georgia::Mailer::Message.index_name rescue nil
          Georgia::Mailer::Message.__elasticsearch__.create_index! force: true
          Georgia::Mailer::Message.import
        end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
georgia_mailer-0.8.0 lib/generators/georgia/mailer/install/install_generator.rb