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.3.0 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.2.3 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.2.2 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.2.1 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.2.0 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.1.0 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.0.15 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.0.14 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.0.13 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.0.12 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.0.11 app/models/concerns/agilibox/timestamp_helpers.rb
agilibox-1.0.10 app/models/concerns/agilibox/timestamp_helpers.rb