Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dave@dave-N-A:~/rails_projects/everyLayar(master)$ rails c
- Loading development environment (Rails 3.2.6)
- 1.9.3p125 :001 > Point.update_points
- Point Load (1.8ms) SELECT `points`.* FROM `points`
- Deal Load (26.7ms) SELECT `icscoupons`.* FROM `icscoupons` WHERE `icscoupons`.`cpnId` = ? LIMIT 1 [["cpnId", 2]]
- SQL (0.1ms) BEGIN
- no need.
- (0.3ms) UPDATE `points` SET `title` = 'testing_deal', `summary` = 'testing_deal', `detail` = 'testing_deal', `price` = 100.0 WHERE `points`.`` IS NULL
- (0.1ms) ROLLBACK
- ActiveRecord::StatementInvalid: Mysql::Error: Unknown column 'points.' in 'where clause': UPDATE `points` SET `title` = 'testing_deal', `summary` = 'testing_deal', `detail` = 'testing_deal', `price` = 100.0 WHERE `points`.`` IS NULL
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/connection_adapters/mysql_adapter.rb:346:in `prepare'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/connection_adapters/mysql_adapter.rb:346:in `exec_stmt'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/connection_adapters/mysql_adapter.rb:328:in `block in exec_delete'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.6/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/connection_adapters/mysql_adapter.rb:327:in `exec_delete'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:96:in `update'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/persistence.rb:355:in `update'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/locking/optimistic.rb:68:in `update'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/attribute_methods/dirty.rb:74:in `update'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/timestamp.rb:70:in `update'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/callbacks.rb:272:in `block in update'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:403:in `_run__571539111__update__535854852__callbacks'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:405:in `__run_callback'
- ... 14 levels...
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/transactions.rb:208:in `transaction'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/transactions.rb:241:in `block in save'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.6/lib/active_record/transactions.rb:240:in `save'
- from /home/dave/rails_projects/everyLayar/app/models/point.rb:47:in `block in update_points'
- from /home/dave/rails_projects/everyLayar/app/models/point.rb:40:in `each'
- from /home/dave/rails_projects/everyLayar/app/models/point.rb:40:in `update_points'
- from (irb):1
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.6/lib/rails/commands/console.rb:47:in `start'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.6/lib/rails/commands/console.rb:8:in `start'
- from /home/dave/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.6/lib/rails/commands.rb:41:in `<top (required)>'
- from script/rails:6:in `require'
- from script/rails:6:in `<main>'1.9.3p125 :002 >
Add Comment
Please, Sign In to add comment