Guest User

Untitled

a guest
May 27th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. class ResponderCuestionarioController < ApplicationController
  2.  
  3. class ResponderCuestionarioController < ApplicationController
  4.  
  5. def new
  6. @cuestionario = Cuestionario.find(params[:cuestionario_id])
  7. end
  8.  
  9. def create
  10. @cuestionario = Cuestionario.find(params[:cuestionario_id])
  11. params[:respuestas].each do |respuesta_attributes|
  12. r = Respuesta.new(respuesta_attributes)
  13. r.save
  14. end
  15.  
  16. respond_to do |format|
  17. format.html {
  18. redirect_to cuestionario_path(@cuestionario)
  19. }
  20. end
  21. end
  22.  
  23. end
  24.  
  25. end
Add Comment
Please, Sign In to add comment