2
0
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:
nanaya
2015-08-09 01:16:56 +09:00
parent 2be378bd14
commit c1433b7001
2 changed files with 5 additions and 5 deletions

View File

@@ -76,4 +76,8 @@ class AnonymousUser
true
end
end
def blacklisted_tags_array
CONFIG["default_blacklists"]
end
end

View File

@@ -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' %>