这个Railslink_to用class代码怎么写?

How to write this Rails link_to with a class code?

我正在想办法用 Ruby/Rails 格式写这个:

<img src="images/home-dashboard.png" class="wow fadeInUp" data-wow-    duration="4s" alt="">

我不确定如何处理 data-wow-duration=4s

通常我会把第一部分写成:

  <%= image_tag("home-dashboard.png", class: "wow fadeInUp") %>

但是剩下的呢?整个应该怎么写?

你可以把属性名写在引号里,

  <%= image_tag("home-dashboard.png", class: "wow fadeInUp", "data-wow-duration" => "4s") %>

已经回答here