Skip to content
Browse files

Fixed caption length issue with view objects

  • Loading branch information...
1 parent 3bc3489 commit b66bf48b0989258d46bdbc124f53fb593416b72f @adahmash adahmash committed Apr 6, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/helpers/template_helper.rb
View
6 app/helpers/template_helper.rb
@@ -91,7 +91,7 @@ def featured_item item, extra_options = {}
content << content_tag(:div, :class => "feature-caption") do
nested_content = content_tag(options[:title_tag], link_to(item.item_title, item.item_link))
if options[:description]
- nested_content << content_tag(:p, item.item_description)
+ nested_content << content_tag(:p, item.item_description[0,100])
end
nested_content
end
@@ -159,7 +159,7 @@ def featured_item_list_item item, extra_options = {}
content_tag(:li, :class => options[:class]) do
content = content_tag(options[:title_tag], link_to(item.item_title, item.item_link))
- content << content_tag(:p, item.item_description) if options[:item_description]
+ content << content_tag(:p, item.item_description[0,100]) if options[:item_description]
content << content_tag(:h6, posted_by_with_date_and_topic(item)) unless options[:profile_disabled]
content
end
@@ -197,7 +197,7 @@ def double_col_item_list_item item, extra_options = {}
item_image_content << content_tag(:div, :class => 'content') do
description = (options[:raw] || item.is_a?(Article)) ? raw(item.item_description) : item.item_description # yuck...
content = content_tag(options[:title_tag], link_to(item.item_title, item.item_link))
- content << content_tag(:p, description)
+ content << content_tag(:p, description[0,100])
content << item_meta_profile(item)
end
end

0 comments on commit b66bf48

Please sign in to comment.
Something went wrong with that request. Please try again.