add helper file

This commit is contained in:
Maxwell Salzberg 2011-08-10 10:27:34 -07:00
parent 2d6a69cdc8
commit 4bff560a30

View file

@ -0,0 +1,11 @@
module NotifierHelper
def post_message(post, opts={})
if post.respond_to? :formatted_message
message = truncate(post.formatted_message(:plain_text => true), :length => 200)
message = process_newlines(message) if opts[:process_newlines]
message
else
I18n.translate 'notificer.a_post'
end
end
end