FIX: Group#flair_url must be a real URL (#11400)
It used to be a short URL, but that did not work with the lightbox in {{image-uploader}}.
This commit is contained in:
parent
da74b3e14b
commit
ed52577e1c
|
@ -750,7 +750,7 @@ class Group < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def flair_url
|
||||
flair_icon.presence || flair_upload&.short_path
|
||||
flair_icon.presence || flair_upload&.url
|
||||
end
|
||||
|
||||
[:muted, :regular, :tracking, :watching, :watching_first_post].each do |level|
|
||||
|
|
|
@ -30,7 +30,7 @@ RSpec.describe Jobs::MigrateGroupFlairImages do
|
|||
group.reload
|
||||
upload = Upload.last
|
||||
expect(group.flair_upload).to eq(upload)
|
||||
expect(group.flair_url).to eq(upload.short_path)
|
||||
expect(group.flair_url).to eq(upload.url)
|
||||
expect(group[:flair_url]).to eq(nil)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue