Module: Khronos::Storage::Adapter::ActiveRecord

Defined in:
lib/khronos/storage/adapter/activerecord.rb,
lib/khronos/storage/adapter/activerecord/schedule.rb,
lib/khronos/storage/adapter/activerecord/schedule_log.rb,
lib/khronos/storage/adapter/activerecord/migrations/schedule.rb,
lib/khronos/storage/adapter/activerecord/migrations/schedule_log.rb

Defined Under Namespace

Classes: CreateSchedule, CreateScheduleLog, Schedule, ScheduleLog

Class Method Summary collapse

Class Method Details

.connect!(url) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/khronos/storage/adapter/activerecord.rb', line 10

def self.connect!(url)
  require 'active_record'

  ::ActiveRecord::Base.establish_connection(url)
  ::ActiveRecord::Base.include_root_in_json = false
  self
end

.included(base) ⇒ Object



18
19
20
# File 'lib/khronos/storage/adapter/activerecord.rb', line 18

def self.included(base)
  self.migrate!
end