Sha256: f4ec4be470102c429f169fab0351b3a059312cdf169dc9470e116b47d9b04ca9

Contents?: true

Size: 522 Bytes

Versions: 17

Compression:

Stored size: 522 Bytes

Contents

require 'json'

module Khronos
  class Storage
    module Adapter

      module ActiveRecord
        class Schedule < ::ActiveRecord::Base
          attr_accessible :context, :at, :recurrency, :task_url, :callbacks, :active
          has_many :logs, :class_name => ScheduleLog

          def callbacks=(options)
            write_attribute(:callbacks, options.to_json)
          end

          def callbacks
            JSON.parse(read_attribute(:callbacks) || '{}')
          end
        end
      end

    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
khronos-0.1.3 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.1.2 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.1.1 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.1.0 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.0.3.pre4 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.0.3.pre3 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.0.3.pre2 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.0.3.pre1 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.0.2 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.0.2.pre1 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.0.1.pre6 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.0.1.pre5 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.0.1.pre4 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.0.1.pre3 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.0.1.pre2 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.0.1.pre1 lib/khronos/storage/adapter/activerecord/schedule.rb
khronos-0.0.1 lib/khronos/storage/adapter/activerecord/schedule.rb