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

152
Views
Estoy tratando de inyectar un formulario después de que el usuario responda a un formulario, inyecte el segundo en rieles usando js.erb

Hago un formulario complejo y quiero tener un sitio web más receptivo: coloco el segundo formulario como un formulario parcial después de que el usuario haya enviado el primero. Si inyecto un parcial que solo tiene HTML normal p, h1, a: funciona, pero cuando trato de inyectar el formulario auxiliar de rieles, no funciona

esta es la parte que pretende inyectar el formulario:

definir_lista_de_bandas.js.erb

 $('#output_combo').html("<%= render :partial => 'input_combo_speed' %>");

_input_combo_speed.html.delgado

 = form_with scope: 'combo_input', url: combo_speed_path, remote: true do |form| .row .col.s6 ul.collapsible #body li .collapsible-header.active h4 LTE Bands - (@spectrums.select{|i| i[:nr_lte]=="LTE" }).each_with_index do |element, index| = form.check_box element[:value] = "In band:-- " + element[:name]+ + "--, " + element[:bandwhith].to_s + " MHz : ( " + element[:block] + " ) " br .col.s6 ul.collapsible #body li .collapsible-header.active h4 NR Bands - (@spectrums.select{|i| i[:nr_lte]=="NR" }).each_with_index do |element, index| = form.check_box element[:value] = "In band:-- " + element[:name]+ + "--, " + element[:bandwhith].to_s + " MHz : ( " + element[:block] + " ) " br .row = form.submit "Calculate", class: 'btn blue'

controlador_de_velocidad.rb

 def define_list_of_bands # creat the list for checboxes at preview_combo form @spectrums = [] bands.each do |band| result = contuguous_services.get_contiguous_spectrum_in_band(comp_spectrums,band) result.each_with_index do |spectrum,index| if spectrum.bandwhith > 0 @spectrums.append( { nr_lte: band.nr_lte, value: "#{band.name}_#{band.nr_lte}_#{band.duplexing}_#{spectrum.bandwhith}_#{index}_#{request_params[:city_id]}", name: band.name, bandwhith: spectrum.bandwhith, block: spectrum.block, }) end end end respond_to do |format| format.js end

Cualquier ayuda sería muy apreciada. ¡Gracias!

about 4 years ago · Santiago Gelvez
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!