Sha256: d05091dda57b3dc1374e69c72a7ac176d46af9b940ea58b5a4bbd1f545478c26

Contents?: true

Size: 473 Bytes

Versions: 2

Compression:

Stored size: 473 Bytes

Contents

module ChronoModel
  class Railtie < ::Rails::Railtie
    initializer :chrono_create_schemas do
      ActiveRecord::Base.connection.chrono_create_schemas!
    end

    rake_tasks do

     namespace :db do
       namespace :chrono do
         task :create_schemas do
           puts 'create schemas'
           ActiveRecord::Base.connection.chrono_create_schemas!
         end
       end
     end

      task 'db:schema:load' => 'db:chrono:create_schemas'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chrono_model-0.5.0 lib/chrono_model/railtie.rb
chrono_model-0.5.0.beta lib/chrono_model/railtie.rb