fixes #2562: Saved Searches - undefined method

This commit is contained in:
r888888888
2016-01-02 23:48:52 -08:00
parent e97a7bb7d8
commit e9ffa16b09
2 changed files with 5 additions and 1 deletions

View File

@@ -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?

View File

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