Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

239
Views
How to get only image src attribute from rails image_tag?

I have a scenario in which I only need the src attribute generated by image_tag.

ActionController::Base.helpers.image_tag("diane.png")

gives back

<img src=\"/assets/diane-d88012c06a724682b02dfbd9224dbaac15872a3.png\" alt=\"Diane\" />

I only need the string in the src attribute.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can use image_path:

 ActionController::Base.helpers.image_path("diane.png") 
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!