On Wed, Jan 2, 2013 at 3:57 AM, Rafi A <rafiglitz@gmail.com> wrote:
>
>
> On Wed, Jan 2, 2013 at 1:00 AM, Hillary Hueter <weimar1927@gmail.com> wrote:
>>
>> My form fails with the error Mysql2::Error: Column 'date_of_birth' cannot
>> be null. However the Request Parameters have a value for date_of_birth, so
>> i'm not sure whats going on.
>> Request:
>>
>> {"utf8"=>"✓",
>> "authenticity_token"=>"3njnNBX4VgoV32kau3OALfhdIP00Bq78we6EKD7OXHo=",
>> "pilgrim"=>{"surname"=>"Lorem",
>> "first"=>"Ipsum",
>> "middle"=>"Lorem",
>> "aka"=>"Lorem",
>> "title"=>"Mrs. ",
>> "address"=>"111 Mockingbird Lane",
>> "city"=>"City",
>> "state"=>"CA",
>> "email"=>"loremipsum@gmail.com",
>> "telephone"=>"889-279-2727",
>> "nationality"=>"USA",
>> "passport_number"=>"123455",
>> "expiration"=>"06-15-2015",
>> "date_of_birth"=>"06-15-1086",
>> "jordan"=>"yes",
>> "room"=>"Share",
>> "leader"=>"Group Leader",
>> "price"=>"4000",
>> "deposit"=>"500",
>> "trip_id"=>"44",
>> "balance"=>"3500"},
>>
>> "commit"=>"Save"}
>>
>>
>> Here's a gist with the form and controller code that's causing the issue.
>> https://gist.github.com/4429457
>>
>> --
>> 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 rubyonrails-talk@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscribe@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/rubyonrails-talk/-/oKhWrEOR_WcJ.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
> What is the datatype that you have set for the date_of_birth column? If it's
> date-time, then you can try convert the string into Date object first and
> then store the parsed value in database.
Is this valid?
>> "date_of_birth"=>"06-15-1086",
??
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment