Eliminate various dead code.

This commit is contained in:
evazion
2020-03-31 18:32:28 -05:00
parent e0a72ef135
commit 08ce5a71c4
5 changed files with 11 additions and 32 deletions

View File

@@ -1,8 +0,0 @@
class DeleteUploadFilesJob < ApplicationJob
queue_as :default
queue_with_priority 20
def perform(md5, file_ext, upload_id)
# do nothing
end
end

View File

@@ -1,4 +1,4 @@
class PostPresenter < Presenter class PostPresenter
attr_reader :pool, :next_post_in_pool attr_reader :pool, :next_post_in_pool
delegate :tag_list_html, :split_tag_list_html, :split_tag_list_text, :inline_tag_list_html, to: :tag_set_presenter delegate :tag_list_html, :split_tag_list_html, :split_tag_list_text, :inline_tag_list_html, to: :tag_set_presenter
@@ -150,10 +150,6 @@ class PostPresenter < Presenter
@tag_set_presenter ||= TagSetPresenter.new(@post.tag_array) @tag_set_presenter ||= TagSetPresenter.new(@post.tag_array)
end end
def preview_html
PostPresenter.preview(@post)
end
def humanized_essential_tag_string def humanized_essential_tag_string
@humanized_essential_tag_string ||= tag_set_presenter.humanized_essential_tag_string(default: "##{@post.id}") @humanized_essential_tag_string ||= tag_set_presenter.humanized_essential_tag_string(default: "##{@post.id}")
end end

View File

@@ -1,17 +0,0 @@
class Presenter
def self.h(s)
CGI.escapeHTML(s.to_s)
end
def self.u(s)
CGI.escape(s)
end
def h(s)
CGI.escapeHTML(s)
end
def u(s)
CGI.escape(s)
end
end

View File

@@ -3,7 +3,7 @@
# This class makes it easy to fetch the categories for all the # This class makes it easy to fetch the categories for all the
# tags in one call instead of fetching them sequentially. # tags in one call instead of fetching them sequentially.
class TagSetPresenter < Presenter class TagSetPresenter
extend Memoist extend Memoist
attr_reader :tag_names attr_reader :tag_names
@@ -147,5 +147,13 @@ class TagSetPresenter < Presenter
html html
end end
def h(s)
CGI.escapeHTML(s)
end
def u(s)
CGI.escape(s)
end
memoize :tags, :tags_by_category, :ordered_tags, :humanized_essential_tag_string memoize :tags, :tags_by_category, :ordered_tags, :humanized_essential_tag_string
end end

View File

@@ -1,4 +1,4 @@
class UploadPresenter < Presenter class UploadPresenter
attr_reader :upload attr_reader :upload
delegate :inline_tag_list_html, to: :tag_set_presenter delegate :inline_tag_list_html, to: :tag_set_presenter