Project

General

Profile

Defect #42084 » quick-workaround.diff

Mizuki ISHIKAWA, 2025-01-09 09:58

View differences:

app/helpers/application_helper.rb
352 352
        :srcset => "#{thumbnail_path} 2x",
353 353
        :style => "max-width: #{thumbnail_size}px; max-height: #{thumbnail_size}px;",
354 354
        :title => attachment.filename,
355
        :alt => attachment.filename,
355 356
        :loading => "lazy"
356 357
      ),
357 358
      attachment_path(
test/helpers/application_helper_test.rb
1921 1921
    a = Attachment.find(3)
1922 1922
    assert_select_in(
1923 1923
      thumbnail_tag(a),
1924
      'a[href=?] img[title=?][src=?][loading="lazy"]',
1925
      "/attachments/3", "logo.gif", "/attachments/thumbnail/3/200")
1924
      'a[href=?] img[title=?][alt=?][src=?][loading="lazy"]',
1925
      "/attachments/3", "logo.gif", "logo.gif", "/attachments/thumbnail/3/200")
1926 1926
  end
1927 1927

  
1928 1928
  def test_link_to_project
(2-2/5)