Created
May 11, 2013 13:45
-
-
Save elrok123/5560017 to your computer and use it in GitHub Desktop.
order save error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):005:0> order.save | |
(0.1ms) BEGIN | |
SQL (0.2ms) INSERT INTO `orders` (`ClientID`, `OrderTotal`, `created_at`, `updated_at`) VALUES (NULL, NULL, '2013-05-11 13:43:12', '2013-05-11 13:43:12') | |
(167.8ms) ROLLBACK | |
ActiveRecord::UnknownAttributeError: unknown attribute: order_id | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/attribute_assignment.rb:88:in `block in assign_attributes' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/attribute_assignment.rb:78:in `each' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/attribute_assignment.rb:78:in `assign_attributes' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/associations/association.rb:236:in `block in build_record' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/base.rb:500:in `initialize' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/reflection.rb:183:in `new' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/reflection.rb:183:in `build_association' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/associations/association.rb:233:in `build_record' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/associations/collection_association.rb:112:in `build' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/associations/has_many_through_association.rb:78:in `build_through_record' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/associations/has_many_through_association.rb:85:in `save_through_record' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/associations/has_many_through_association.rb:52:in `insert_record' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/autosave_association.rb:348:in `block in save_collection_association' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/autosave_association.rb:337:in `each' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/autosave_association.rb:337:in `save_collection_association' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/autosave_association.rb:191:in `block in add_autosave_association_callbacks' | |
... 15 levels... | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/validations.rb:50:in `save' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/attribute_methods/dirty.rb:22:in `save' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/transactions.rb:259:in `block (2 levels) in save' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/transactions.rb:208:in `transaction' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/transactions.rb:311:in `with_transaction_returning_status' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/transactions.rb:259:in `block in save' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/transactions.rb:270:in `rollback_active_record_state!' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/transactions.rb:258:in `save' | |
from (irb):5 | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/commands/console.rb:47:in `start' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/commands/console.rb:8:in `start' | |
from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/commands.rb:41:in `<top (required)>' | |
from script/rails:6:in `require' | |
from script/rails:6:in `<main>'irb(main):006:0> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment