fixes #2562: Saved Searches - undefined method
This commit is contained in:
@@ -3,6 +3,10 @@ class SavedSearch < ActiveRecord::Base
|
|||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
|
def posts_search_available?
|
||||||
|
Danbooru.config.listbooru_server.present? && CurrentUser.is_gold?
|
||||||
|
end
|
||||||
|
|
||||||
def refresh_listbooru(user_id)
|
def refresh_listbooru(user_id)
|
||||||
return false unless Danbooru.config.listbooru_enabled?
|
return false unless Danbooru.config.listbooru_enabled?
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<% if category.present? %>
|
<% if category.present? %>
|
||||||
<%= link_to_if SavedSearch.posts_search_available?, category.tr("_", " "), posts_path(:tags => "search:#{category}") %>
|
<%= link_to_if SavedSearch.posts_search_available?, category.tr("_", " "), posts_path(:tags => "search:#{category}") %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to "Uncategorized", posts_path(:tags => "search:all") %>
|
<%= link_to_if SavedSearch.posts_search_available?, "Uncategorized", posts_path(:tags => "search:all") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</h2>
|
</h2>
|
||||||
<table class="striped" width="100%">
|
<table class="striped" width="100%">
|
||||||
|
|||||||
Reference in New Issue
Block a user