blob: 14cbe7c7720aafca09072d273be0ab3ffa151d03 (
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, super)
end
def body
content_tag(:div, sanitize(truncate(super, :length => 32, :separator => ' ')))
end
end
|