Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##
- >> User.after_create
- => [#<UserProfilesEngine::AttachProfileToUser:0xb7723af0>]
- ##
- >> u = User.new(:email => 'foo@bar.baz', :password => '1234', :password_confirmation => '1234'); u.username = "user#{(rand()*1000).to_i}"; u.save!
- ## Error
- ActiveRecord::ActiveRecordError: Callbacks must be a symbol denoting the method to call, a string to be evaluated, a block to be invoked, or an object responding to the callback method.
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:342:in `callback'
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:330:in `each'
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:330:in `callback'
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:255:in `create_without_timestamps'
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/timestamp.rb:39:in `create'
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1789:in `create_or_update_without_callbacks'
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:242:in `create_or_update'
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1551:in `save_without_validation!'
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/validations.rb:762:in `save_without_transactions!'
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/transactions.rb:133:in `save!'
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/database_statements.rb:59:in `transaction'
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/transactions.rb:95:in `transaction'
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/transactions.rb:121:in `transaction'
- from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/transactions.rb:133:in `save!'
- from (irb):3
Add Comment
Please, Sign In to add comment