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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
---