Defect #42084 » quick-workaround.diff
| app/helpers/application_helper.rb | ||
|---|---|---|
|
:srcset => "#{thumbnail_path} 2x",
|
||
|
:style => "max-width: #{thumbnail_size}px; max-height: #{thumbnail_size}px;",
|
||
|
:title => attachment.filename,
|
||
|
:alt => attachment.filename,
|
||
|
:loading => "lazy"
|
||
|
),
|
||
|
attachment_path(
|
||
| test/helpers/application_helper_test.rb | ||
|---|---|---|
|
a = Attachment.find(3)
|
||
|
assert_select_in(
|
||
|
thumbnail_tag(a),
|
||
|
'a[href=?] img[title=?][src=?][loading="lazy"]',
|
||
|
"/attachments/3", "logo.gif", "/attachments/thumbnail/3/200")
|
||
|
'a[href=?] img[title=?][alt=?][src=?][loading="lazy"]',
|
||
|
"/attachments/3", "logo.gif", "logo.gif", "/attachments/thumbnail/3/200")
|
||
|
end
|
||
|
def test_link_to_project
|
||