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

116
Views
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
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!