>
> I fix the problem.
>
It is very annoying when this types of mistakes do not generate an error. 
(It is almost as bad as my day of c programming chasing a memory leak.
 dgb to the rescue.)

class PatientsController < ApplicationController
def create
    @patient = Patient.new(patient_params)
    @elig [email protected]_elig  patient_params["elig_attributes"] #***** I 
was missing this line
    debugger
    respond_to do |format|
      if @patient.save
        format.html { redirect_to @patient, notice: 'Patient was 
successfully created.' }
        format.json { render :show, status: :created, location: @patient }
      else
        format.html { render :new }
        format.json { render json: @patient.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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/cc78ccab-babe-45b7-8c7c-48bebadcd1c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to