Hi
I wrote this retrieval statement to check if an appointment being saved or created dosent conflict with one thats already saved. but its not working, can someone please point me to where I'm going wrong?
@new_appointment = :appointment #which is the params of appointment being sent back from submit.
@appointments = Appointment.all(:conditions => { :date_of_appointment => @new_appointment.date_of_appointment, :trainer_id => @new_appointment.trainer_id}
)
the error is from the :date_of_appointment => @new_appointment.date_of_appointment
this will always be false as:
thank you