Add API data to show/index views
This commit is contained in:
@@ -28,6 +28,14 @@ class PostReplacement < ApplicationRecord
|
||||
end
|
||||
end
|
||||
|
||||
module ApiMethods
|
||||
def html_data_attributes
|
||||
[:post_id, :creator_id]
|
||||
end
|
||||
end
|
||||
|
||||
include ApiMethods
|
||||
|
||||
def suggested_tags_for_removal
|
||||
tags = post.tag_array.select { |tag| Danbooru.config.remove_tag_after_replacement?(tag) }
|
||||
tags = tags.map { |tag| "-#{tag}" }
|
||||
|
||||
Reference in New Issue
Block a user