Sha256: 676af2008b7764f180bc38e2200116b0282827075f07f532da5658e54ab717fb

Contents?: true

Size: 539 Bytes

Versions: 3

Compression:

Stored size: 539 Bytes

Contents

require 'active_record'
require 'sidekiq-apriori/arb'
require 'sqlite3'

ActiveRecord::Base.establish_connection(
  :adapter   => :sqlite3,
  :database  => 'spec/support/test.db'
)

ActiveRecord::Schema.define do
  drop_table(:arbs) rescue nil
  create_table(:arbs) { |t| t.column(:priority, :string) }
end

class Arb < ActiveRecord::Base
  include Sidekiq::Apriori::Arb
end

class PrioritizedUsingMethod < Arb
  prioritize using: :some_method
end

class PrioritizedUsingCallable < Arb
  prioritize do
    self.some_other_method
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sidekiq-apriori-0.1.1 spec/support/arb.rb
sidekiq-apriori-0.0.3 spec/support/arb.rb
sidekiq-apriori-0.0.2 spec/support/arb.rb