O
O
Oversec2017-03-14 14:48:24
Ruby on Rails
Oversec, 2017-03-14 14:48:24

How to insert an image in React + Rails?

It is necessary to add an image to the img tag that is in app/assets/images/ . Tried image_tag assets_url - didn't help. Washes who faced?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zaporozhchenko Oleg, 2017-03-14
@Oversec

assets_url use to get the path in the API response
If you don't use the API, put it in a hidden element in the data attribute and read it via javascript

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question