Instance variable as source in image_tag

I would like to use an instance variable as the source in my image tag.
Is something like this possible? For example:

<%= image_tag(@new_image) %>

linked to an action that uses a model with:

@new_image = “some_image.jpg”

If it’s an instance variable from a model, you’ll have to go
attr_reader :thingie in the model, and

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs