Return the body of a note comment as a rich text object

This commit is contained in:
Tom Hughes 2012-10-15 22:34:55 +01:00
parent 324c37a39b
commit 654d22ed2e
3 changed files with 7 additions and 2 deletions

View file

@ -18,4 +18,9 @@ class NoteComment < ActiveRecord::Base
self.author.display_name
end
end
# Return the comment text
def body
RichText.new("text", read_attribute(:body))
end
end

View file

@ -118,7 +118,7 @@ class Notifier < ActionMailer::Base
@locale = recipient.preferred_language_from(I18n.available_locales)
@noteurl = browse_note_url(comment.note, :host => SERVER_URL)
@place = comment.note.nearby_place
@comment = RichText::Text.new(comment.body)
@comment =comment.body
@owner = recipient == comment.note.author
@commenter = comment.author_name