app/presenters: remove unused forum_post/note/post_version presenters.

This commit is contained in:
evazion
2017-02-06 02:23:51 -06:00
parent 5c16e9ce48
commit ec653dce71
6 changed files with 0 additions and 49 deletions

View File

@@ -1,8 +0,0 @@
class ForumTopicPresenter < Presenter
attr_reader :forum_topic, :forum_posts
def initialize(forum_topic, forum_posts)
@forum_posts = forum_posts
@forum_topic = forum_topic
end
end

View File

@@ -1,9 +0,0 @@
class NotePresenter
def initialize(note)
@note = note
end
def formatted_body
note.body.gsub(/<tn>(.+?)<\/tn>/m, '<br><p class="tn">\1</p>').gsub(/\n/, '<br>')
end
end

View File

@@ -1,20 +0,0 @@
class PostVersionPresenter < Presenter
attr_reader :post_version
def initialize(post_version)
@post_version = post_version
end
def changes
html = []
html << post_version.tag_array
html << "<ins>source:#{h(post_version.source)}</ins>" if post_version.source
html << "<ins>rating:#{h(post_version.rating)}</ins>" if post_version.rating
html << "<ins>parent:#{post_version.parent_id}</ins>" if post_version.parent_id
html.join(" ").html_safe
end
def updater_name
User.id_to_name(post_version.updater_id)
end
end