Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

433
Vistas
Ruby on Rails 7 - Is there any way to implement js.erb files?

I've looked around for a couple days now for a way to implement js.erb files into my Ruby On Rails 7 application and could not find any resources on this topic. Are js.erb files completely depreciated in Rails 7? If so, is there any way to call in partials in the javascript files of import map?

I'm trying to implement a javascript function that re renders and updates the "like" count on a post. My approach requires me to pull the count data from a table and change the element's text with that ruby partial.

Any resources or a point in the right direction would be greatly appreciated!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Not really.

With RoR 7, Javascript is handled using these ways:

  • Webpack
  • Import Map
  • ESBuild
  • Rollup

Regardless the handling technology used, the Javascript code is packaged during the development/deployment process. It can not be updated at runtime.

However, the need you expressed is easy to address. Use Hotwire, the new technology introduced few months ago and now part of Rails 7. Simply speaking, Hotwire stands for HTML over the wire. What it does is to send a partial over the wire in real time. Check on YouTube and you'll find plenty of tutorials explaining how to use Hotwire with Stimulus, React or Vue.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda