Skip to content

Commit

Permalink
Fix the sample account icon of Profile directory to local only (masto…
Browse files Browse the repository at this point in the history
  • Loading branch information
mayaeh authored and hiyuki2578 committed Oct 2, 2019
1 parent ad3407a commit 216a39b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class Tag < ApplicationRecord
has_and_belongs_to_many :statuses
has_and_belongs_to_many :accounts
has_and_belongs_to_many :sample_accounts, -> { searchable.discoverable.popular.limit(3) }, class_name: 'Account'
has_and_belongs_to_many :sample_accounts, -> { local.discoverable.popular.limit(3) }, class_name: 'Account'

has_many :featured_tags, dependent: :destroy, inverse_of: :tag
has_one :account_tag_stat, dependent: :destroy
Expand Down
2 changes: 1 addition & 1 deletion app/presenters/instance_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def domain_count
end

def sample_accounts
Rails.cache.fetch('sample_accounts', expires_in: 12.hours) { Account.discoverable.popular.limit(3) }
Rails.cache.fetch('sample_accounts', expires_in: 12.hours) { Account.local.discoverable.popular.limit(3) }
end

def version_number
Expand Down

0 comments on commit 216a39b

Please sign in to comment.