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

117
Visualizações
using js.erb with a post request

I currently have a get request that passes through a list of car types. This request directs to a controller action that then renders a js.erb file that displays a modal with all of these car types in a list. However when the list of car types is large, i am getting a 'url is too long error'. I've done some research and discovered that it is better to do this as a post request.

However when i make this change, the modal no longer appears, but instead just a page of the modal html is displayed. I can't seem to render this modal properly with a post request.

I have tried using format: :js in the controller, or using remote: true, with no luck.

Are there any reasons for why it is only rendering the html and not the actual modal itself?

      respond_to do |format|
        format.js
      end

simple_form_for :car, url: cars_path(format: :js), remote: true

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