acts_as_user hook breaks active-record base.new with attribs

4 views
Skip to first unread message

Ladina Rothaus

unread,
Dec 6, 2007, 4:34:01 AM12/6/07
to active-rbac
when i have the acts_as_user hook in my model i cant initialize a new
user with attributes
without getting an error.

---snip
User.new( :login => "asdf" )
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each
from ./script/../config/../config/../vendor/rails/activerecord/
lib/active_record/base.rb:1671:in `attributes='
from ./script/../config/../config/../vendor/rails/activerecord/
lib/active_record/base.rb:1505:in `initialize_without_callbacks'
from ./script/../config/../config/../vendor/rails/activerecord/
lib/active_record/callbacks.rb:225:in `initialize'
from (irb):4:in `new'
from (irb):4
---

i could not figure out why though...
Reply all
Reply to author
Forward
0 new messages