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