Sha256: 01bbc7cb68fcf4f7b0be4227fdb51a45eb07ceb2b79c1f30e035e0f69da138c0

Contents?: true

Size: 458 Bytes

Versions: 7

Compression:

Stored size: 458 Bytes

Contents

module ESA
  module Filters
    module TimestampFilter
      extend ActiveSupport::Concern

      included do
        scope :created_before, lambda { |time| where(arel_table[:created_at].lt(time)) }
      end
    end
  end
end

ESA::Amount.send :include, ESA::Filters::TimestampFilter
ESA::Event.send :include, ESA::Filters::TimestampFilter
ESA::Flag.send :include, ESA::Filters::TimestampFilter
ESA::Transaction.send :include, ESA::Filters::TimestampFilter

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
event_sourced_accounting-0.2.6 lib/esa/filters/timestamp_filter.rb
event_sourced_accounting-0.2.4 lib/esa/filters/timestamp_filter.rb
event_sourced_accounting-0.2.3 lib/esa/filters/timestamp_filter.rb
event_sourced_accounting-0.2.2 lib/esa/filters/timestamp_filter.rb
event_sourced_accounting-0.1.6 lib/esa/filters/timestamp_filter.rb
event_sourced_accounting-0.1.4 lib/esa/filters/timestamp_filter.rb
event_sourced_accounting-0.1.3 lib/esa/filters/timestamp_filter.rb