Hassan Schroeder wrote in post #1163781:
> On Mon, Dec 1, 2014 at 2:33 PM, Dmoneyzzz Darko <lists@ruby-forum.com>
> wrote:
> So what do you see there? Use `view source`.
>
> The likely cause of missing values is either
>
> 1) the values were never inserted into the DB to start with
> or
> 2) you're not setting @appointment in your controller
>
> Either of those should be easy to identify. Start by looking at your
> DB. If the data isn't there, look at your logs; are the params being
> received what you expect? Does your model have validations that
> might be failing?
>
> --
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
Hello, I reviewed my seeds.rb, development log, and looked throughout my
project and I have come to the conclusion that my values are not sent to
the db.
I have this code in my appointments controller
def appointment_params
params.require(:appointment).permit(:physician_id, :patient_id,
:reason, :appointment_date, :appointment_time, :notes, :appt_completion)
end
And I made sure each field existed in the schema.rb.
I searched through my development log and it appears that the params are
filled when the appointment is created. For the array I created called
:appointment_time, I'm pretty sure those value are sent to the db as an
index number. I am really lost but thanks for your help so far.
--
Posted via http://www.ruby-forum.com/.
--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/92c420970610a500d493fc4d652b78ef%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment