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-1.9.6 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.5 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.4 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.3 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.1 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.9.0 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.8.0 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.7.4 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.7.3 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.7.2 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.7.1 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.7.0 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.6.2 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.6.1 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.6.0 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.5.13 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.5.12 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.5.11 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.5.10 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.5.9 app/models/concerns/agilibox/timestamp_helpers.rb