users: refactor limit methods.

* Refactor various user limit methods to class methods from instance
  methods so they can be used outside the context of a single user.

* Remove the Danbooru.config.base_tag_query_limit option.
This commit is contained in:
evazion
2021-01-01 18:50:03 -06:00
parent ecd29c1a66
commit 0b2f9fafa8
3 changed files with 85 additions and 63 deletions

View File

@@ -54,9 +54,9 @@
</tr>
<tr>
<td>Tag Limit</td>
<td>2</td>
<td><%= Danbooru.config.base_tag_query_limit %></td>
<td><%= Danbooru.config.base_tag_query_limit*2 %></td>
<td><%= User.tag_query_limit(User::Levels::MEMBER) %></td>
<td><%= User.tag_query_limit(User::Levels::GOLD) %></td>
<td><%= User.tag_query_limit(User::Levels::PLATINUM) %></td>
</tr>
<tr>
<td>See Hidden Tags</td>