Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ResponderCuestionarioController < ApplicationController
- class ResponderCuestionarioController < ApplicationController
- def new
- @cuestionario = Cuestionario.find(params[:cuestionario_id])
- end
- def create
- @cuestionario = Cuestionario.find(params[:cuestionario_id])
- params[:respuestas].each do |respuesta_attributes|
- r = Respuesta.new(respuesta_attributes)
- r.save
- end
- respond_to do |format|
- format.html {
- redirect_to cuestionario_path(@cuestionario)
- }
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment