Sha256: f9415a494611b00864742ff0f3972d20f03ba863b04abac612060569f9cabe07

Contents?: true

Size: 340 Bytes

Versions: 1

Compression:

Stored size: 340 Bytes

Contents

module Freemium
  module Transaction

    def self.included(base)
      base.class_eval do
        scope :since, lambda { |time| where(["created_at >= ?", time]) }

        belongs_to :subscription

        composed_of :amount, :class_name => 'Money', :mapping => [ %w(amount_cents cents) ], :allow_nil => true
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
freemium-ajb-0.0.4 lib/freemium/transaction.rb