Sha256: 9656b54c3d5722413203c0ab192896eb3bb751bec9c5bbd4b9ca44948223ad4c

Contents?: true

Size: 252 Bytes

Versions: 7

Compression:

Stored size: 252 Bytes

Contents

module CreatedAgo
  extend ActiveSupport::Concern

  included do
    include Mongoid::Timestamps
    include ActionView::Helpers::DateHelper

    def created_ago
      created_at ? "submitted #{time_ago_in_words(created_at)} ago" : ''
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
character-1.0.6 app/models/concerns/created_ago.rb
character-1.0.5 app/models/concerns/created_ago.rb
character-1.0.4 app/models/concerns/created_ago.rb
character-1.0.3 app/models/concerns/created_ago.rb
character-1.0.2 app/models/concerns/created_ago.rb
character-1.0.1 app/models/concerns/created_ago.rb
character-1.0.0 app/models/concerns/created_ago.rb