Sha256: d6cd805d3a8bbbe8526c94afbe829052aa43ab304c618d8c49dce3827db20a21

Contents?: true

Size: 298 Bytes

Versions: 72

Compression:

Stored size: 298 Bytes

Contents

module Agilibox::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

72 entries across 72 versions & 1 rubygems

Version Path
agilibox-2.0.0 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.11.0 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.10.5 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.10.2 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.10.1 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.10.0 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.20 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.19 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.18 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.17 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.16 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.15 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.14 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.13 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.12 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.11 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.10 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.9 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.8 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.7 app/models/concerns/agilibox/timestamp_helpers.rb