aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Sak <joe@joesak.com>2011-06-23 09:59:35 -0500
committerJoe Sak <joe@joesak.com>2011-06-23 09:59:35 -0500
commit4f611046233d1e449f6c01d2687db9da0dc26649 (patch)
treeab001c90bd8cc9700ca8ca6d75f82e9c86ade5c7
parent787a0916b1514a7b904f5653d0c2810aab4ffa94 (diff)
downloadrefinerycms-blog-4f611046233d1e449f6c01d2687db9da0dc26649.tar.gz
refinerycms-blog-4f611046233d1e449f6c01d2687db9da0dc26649.tar.bz2
refinerycms-blog-4f611046233d1e449f6c01d2687db9da0dc26649.zip
this needs html_safe
-rw-r--r--app/helpers/blog_posts_helper.rb2
-rw-r--r--spec/models/blog_post_spec.rb6
2 files changed, 7 insertions, 1 deletions
diff --git a/app/helpers/blog_posts_helper.rb b/app/helpers/blog_posts_helper.rb
index 1922862..5f68c04 100644
--- a/app/helpers/blog_posts_helper.rb
+++ b/app/helpers/blog_posts_helper.rb
@@ -50,7 +50,7 @@ module BlogPostsHelper
post.body,
:length => RefinerySetting.find_or_set(:blog_post_teaser_length, 250),
:preserve_html_tags => true
- )
+ ).html_safe
end
end
end
diff --git a/spec/models/blog_post_spec.rb b/spec/models/blog_post_spec.rb
index 0514473..46da3ac 100644
--- a/spec/models/blog_post_spec.rb
+++ b/spec/models/blog_post_spec.rb
@@ -184,4 +184,10 @@ describe BlogPost do
end
end
end
+
+ describe "custom teasers" do
+ it "should allow a custom teaser" do
+ Factory.build(:blog_post, :custom_teaser => 'This is some custom content').should be_valid
+ end
+ end
end