I have this code below, it still gives me the error, 
ActiveRecord::MultiparameterAssignmentErrors.  It is not catching the rescue 
for some reason.  Ideas? 

def create
    bad =[]
    @tour_type = TourType.new(params[:tour_type])
    if @tour_type.save
     render :update do |page|
       page << "Redbox.close;"
       page.call "ProtoGrowl.success", "Succesfully created 
#{@tour_type.name}"
     end
    end
    rescue ActiveRecord::MultiparameterAssignmentErrors
     if params[:tour_type][:usual_price_number].blank?
       bad << "Usual price must not be 0.00"
     end
    
    rescue ActiveRecord::RecordInvalid
     bad << "#{@tour_type.errors.full_messages}"
    
    unless bad.empty?
     flash.now[:error] = "#{bad.length} Errors have occured in this form" 
     flash.now[:items] = bad 
     render :update do |page|
        page[:flash].replace_html :partial => 'shared/flash_box' and return
      end
    end
  end

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to