Rails not adding model field to insert query -
I added a column to the rail in DB through the migration, and new.html to add the field. In the form
The correct data is in the request parameter, but the generated query is a null one every time for the column.
Here are the request parameters: <= "Gtc: mediawiki-xid =" 8 "," project_id "=> 5 "," Allocation "=>" 50 "," person_id "=" 33 "," end_date "=>" 2010/08/05 "}," authenticity_token "=> 8f157a2a220caf716607162ce9557ab6505aab1a "}
and there is an error as a result of the query showing the tap column here:
Mysql :: error: column 'end_date' can not be zero : `Assignment` start_date,` created_at`, `project_id`,` updated_t`, `allocation`, 'person_i`,' and_data`) value ('2010-08-04', '2010-08-04 03:36: Code> class ChangeDates & LT; ActiveRecord :: Migrate DF self.up add_column: assignment,: and_date, date =: empty => false, rename_column: function, date, date, start date, end self.down remove_column: task,: end_date rename_column: work, start_date, date end End
I do not understand what went wrong. I have rolled back and many times have changed the change with no luck. I'm stumped.
to answer you questions about attr_accessor, scope accessor S method will call before the class, so the value for the accelerator was saving, but when the savings were called, this method was returning the call. I hope it illustrates by example:
< P> I have done the same thing many times, its super disappointment
Comments
Post a Comment