Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # i have the following scaffolded create method in my controller. i've
- # changed nothing since it was generated by scaffold.
- # POST /log_item
- # POST /log_item.xml
- def create
- @log_item = LogItem.new(params[:log_item])
- respond_to do |format|
- if @log_item.save
- flash[:notice] = 'LogItem was successfully created.'
- format.html { redirect_to(@log_item) }
- format.xml { render :xml => @log_item, :status => :created, :location => @log_item }
- else
- format.html { render :action => "new" }
- format.xml { render :xml => @log_item.errors, :status => :unprocessable_entity }
- end
- end
- end
- # and you would think that the first command in the method would go through assigning all the
- # parameter values:
- #Processing LogItemsController#create (for 127.0.0.1 at 2008-10-09 12:38:44) [POST]
- # Session ID: BAh7BzoJdXNlcmkCYSciCmZsYXNoSUM6J0FjdGlvbkNvbnRyb2xsZXI6OkZs
- #YXNoOjpGbGFzaEhhc2h7AAY6CkB1c2VkewA=--b50d8bb86feb6b6043307e1ff458b6dafecb2e17
- # Parameters: {"promo_vid"=>"501859", "log_id"=>"257732", "action"=>"create", "controller"=>"log_items", "break_id"=>"1480726", "start_time"=>"2008-10-12 9:36:16 AM", "item_type"=>"PROM"}
- # However, none of those parameter values seem to be getting assigned:
- # ActiveRecord::StatementInvalid (OCIError: ORA-01400: cannot insert NULL into ("LOG"."LOG_ITEM"."LOG_ID"): INSERT INTO "LOG_ITEM" (recorded_media_content_id, promo_vid, log_item_id, log_id, contingency_seq, video_guide, break_id, actual_start_time, bug, item_type, play_id, start_time, actual_airtime, hd_bug) VALUES(NULL, NULL, 15424820, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL))
Add Comment
Please, Sign In to add comment