view app/helpers/application_helper.rb @ 94:0c8a8b390145

Now with epic caching And kicking out builder because I can't figure out how to cache it ;_;
author nanaya <me@myconan.net>
date Thu, 28 Jul 2016 03:49:08 +0900
parents f91e2d00f03f
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