search for: complete_request

Displaying 1 result from an estimated 1 matches for "complete_request".

2006 Jan 02
1
Dealing with collections of model objects
...Here''s a more concrete example: ------- app/controllers/request_controller.rb ------- class RequestController < ApplicationController def make_request # session[:resource] has been defined elsewhere.... @answers = session[:resource].prepare_answers end def complete_request answers = Array.new all_good = params[:answers].all? { |a| a = Answer.create!(a) } if all_good redirect_to :action => ''complete_request'' else render :action => ''make_request''...