Vladyslav Kalyuzhnyy
Vladyslav Kalyuzhnyy

Reputation: 69

image_tag with javascript Rails project

How can i edit this code ?

<img data-seq src="images/model1.png" />

For this , but using script - "data-seq":

<%= image_tag 'model1.png' %>

Upvotes: 0

Views: 278

Answers (2)

Terry Raimondo
Terry Raimondo

Reputation: 639

I'm not sure what you want, but if you want to add a custom data-seq value, use this:

<%= image_tag 'model1.png', data: { seq: '' } %>

Upvotes: 1

Deepak Mahakale
Deepak Mahakale

Reputation: 23711

This will generate what you want

<%= image_tag 'model1.png', data: { seq: nil } %>

Upvotes: 0

Related Questions