mirror of
https://github.com/moebooru/moebooru
synced 2025-08-31 14:05:14 +00:00
Simplify blacklist tags rendering.
This commit is contained in:
@@ -76,4 +76,8 @@ class AnonymousUser
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
def blacklisted_tags_array
|
||||
CONFIG["default_blacklists"]
|
||||
end
|
||||
end
|
||||
|
@@ -28,11 +28,7 @@
|
||||
<%= stylesheet_link_tag :application %>
|
||||
|
||||
<script id="user-blacklisted-tags" type="application/json">
|
||||
<% if @current_user.is_anonymous? %>
|
||||
<%= json_escape CONFIG["default_blacklists"].to_json.html_safe %>
|
||||
<% else %>
|
||||
<%= json_escape @current_user.blacklisted_tags_array.to_json.html_safe %>
|
||||
<% end %>
|
||||
<%= json_escape @current_user.blacklisted_tags_array.to_json.html_safe %>
|
||||
</script>
|
||||
<%= javascript_include_tag :application %>
|
||||
<%= javascript_include_tag 'moe-legacy/application' %>
|
||||
|
Reference in New Issue
Block a user