fixes #18: Source/rating not displayed on post pages
This commit is contained in:
@@ -20,4 +20,13 @@ module PostsHelper
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
def post_source_tag(post)
|
||||
if post.source =~ /^http/
|
||||
text = truncate(post.source.sub(/^https?:\/\//, ""))
|
||||
link_to(truncate(text, :length => 15), post.source)
|
||||
else
|
||||
truncate(post.source, :length => 100)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user