Return the body of a note comment as a rich text object
This commit is contained in:
parent
324c37a39b
commit
654d22ed2e
3 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<% end %>
|
||||
|
||||
==
|
||||
<%= @comment %>
|
||||
<%= @comment.to_text %>
|
||||
==
|
||||
|
||||
<%= t 'notifier.note_comment_notification.details', :url => @noteurl %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue