module Recruiter::PublicableDecoratorHelper

Public Instance Methods

created_at_ago() click to toggle source
# File lib/recruiter/publicable_decorator_helper.rb, line 3
def created_at_ago
  h.time_ago_in_words(object.created_at)
end
publication() click to toggle source
# File lib/recruiter/publicable_decorator_helper.rb, line 23
def publication
  published_at.tap do |string|
    if updated?
      string << ' | ' << updated_at
    end
  end
end
published_at() click to toggle source
# File lib/recruiter/publicable_decorator_helper.rb, line 15
def published_at
  h.t("recruiter.messages.published_at", time: created_at_ago)
end
updated?() click to toggle source
# File lib/recruiter/publicable_decorator_helper.rb, line 11
def updated?
  updated_at_ago != created_at_ago
end
updated_at() click to toggle source
# File lib/recruiter/publicable_decorator_helper.rb, line 19
def updated_at
  h.t("recruiter.messages.updated_at", time: updated_at_ago)
end
updated_at_ago() click to toggle source
# File lib/recruiter/publicable_decorator_helper.rb, line 7
def updated_at_ago
  h.time_ago_in_words(object.created_at)
end