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

233
Views
What's the replacement for .js.erb in Rails 7?

As of Rails 7, .js.erb is deprecated. I used it extensively in a Rails 6 application I've been working on to render a partial on the current page upon the click of a link_to, which was marked as remote. Since I updated my application to Rails 7, clicking the link acts like it's not remote, and Rails gives me an error saying there's a missing template (which there is because I use partials for that action).

I've been doing research about this and I haven't been able to find any recent advice; everything just says use .js.erb. I understand the reason it was taken out has to do with CSP, but it's a bit frustrating since it was so convenient.

Anyway, I'm sure other people are having this problem, so what are we expected to do in replacement of using .js.erb? I saw something about Hotwire but none of the docs I've seen talk about partials, so I'm having trouble figuring it out.

about 4 years ago · Juan Pablo Isaza
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!