Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

246
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda