why would I be getting this error after submitting my form?

NoMethodError in EchantillonsController#create
undefined method `call' for nil:NilClass

This is my create method in the controller:

  def create

    @echantillon = Echantillon.new(params[:echantillon])
    @echantillon.set_eros_values

    respond_to do |format|
      if @echantillon.save
         if params[:echantillon][:vignette].blank?
            format.html { redirect_to(@echantillon) }
            format.xml  { render :xml => @echantillon, :status
=> :created, :location => @echantillon }
         else
            render :action => "location"
         end
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @echantillon.errors, :status
=> :unprocessable_entity }
      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