Sha256: d3f963a83ac22d906081387666b441d64b8ae9200fbe7e3a45ae23636442aedd

Contents?: true

Size: 293 Bytes

Versions: 19

Compression:

Stored size: 293 Bytes

Contents

module BMC::TimestampHelpers
  extend ActiveSupport::Concern

  class_methods do
    def first_created
      reorder(:created_at, :id).first
    end

    def last_created
      reorder(:created_at, :id).last
    end

    def last_updated
      reorder(:updated_at, :id).last
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
bmc-1.6.1 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.6.0 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.5.1 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.5.0 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.4.3 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.4.2 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.4.1 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.4.0 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.3.5 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.3.4 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.3.3 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.3.2 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.3.1 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.3.0 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.2.1 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.2.0 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.1.0 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.0.1 app/models/concerns/bmc/timestamp_helpers.rb
bmc-1.0.0 app/models/concerns/bmc/timestamp_helpers.rb