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

350
Views
ActionController:DesconocidoFormato respond_to do |formato|

Estoy tratando de registrar usuarios que usan Devise y renderizar un archivo JS si se incluye un determinado parámetro en el registro. Recibo el siguiente error:

 ActionController::UnknownFormat in RegistrationsController#create ActionController::UnknownFormat

Esta es mi acción "crear" (marqué la línea a la que apuntaba el error):

 if resource.persisted? if resource.active_for_authentication? set_flash_message :notice, :signed_up if is_flashing_format? sign_up(resource_name, resource) if !params[:name].nil? View.create(name: params[:name]) respond_to do |format| #THIS IS THE LINE WITH THE ERROR format.js end else respond_with resource, location: after_sign_up_path_for(resource) end else respond_with resource, location: inactive_path_for(resource) end else respond_with resource end

La acción es "crear", en app/controllers/registrations_controller.rb . El archivo JS que intento representar es app/views/devise/registrations/create.js.erb .

Mi sospecha es que hay un problema para encontrar el archivo, pero no puedo averiguar cómo señalarlo en la ruta correcta, o si ese es el problema correcto. ¿Alguien tiene alguna idea?

over 4 years ago · Santiago Trujillo
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!