A
A
Artyom Lagun2013-11-26 15:52:05
HTML
Artyom Lagun, 2013-11-26 15:52:05

How to insert an image in Ruby on Rails?

The question is: I add html code through text_area. This code has an image. Which src should I set so that it takes the image assets/images/portfolios/full/image_name.png?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Artyom Lagun, 2013-11-26
@Holzfaller

I found a solution through trial and error: < img src="/assets/portfolio/full/image_name.png" >

I
int03e, 2013-11-26
@int03e

asset_path "portfolios/full/image_name.png"

O
OnYourLips, 2013-11-27
@OnYourLips

image_tag
Before doing anything, read the documentation on the framework for at least 20 minutes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question