view app/helpers/application_helper.rb @ 97:ff5557f9902c

Avoid uniformly expiring cache
author nanaya <me@myconan.net>
date Thu, 28 Jul 2016 07:08:52 +0900
parents 0c8a8b390145
children c5c095f6981e
line wrap: on
line source

module ApplicationHelper
  include Twitter::Autolink

  def ellipsize(text, limit = 30)
    if text.length <= limit
      text
    else
      "#{text.first(limit)}..."
    end
  end

  def atom_id(id)
    "tag:#{request.host_with_port},2005:#{id}"
  end
end