blob: c6f10d51f12fa20e45ac59f8fc4d0eae3702ff95 (
plain) (
tree)
|
|
require 'delegate'
class SidebarPostDecorator < SimpleDelegator
include ActionView::Helpers::TagHelper
include ActionView::Helpers::TextHelper
def initialize(post)
super(post)
end
def title
content_tag(:h2, link_to(super, __getobj__.friendly_id))
end
def body
content_tag(:div, sanitize(truncate(super, :length => 32, :separator => ' ')))
end
end
|