The code in question:
t.messages << Message.new({ :body => “ya message body”, :user =>
users(:bob) })
t is a Ticket object, and a Ticket has_many :messages. Both Ticket
and Message mixin acts_as_paranoid. I also get the same error if I
call Ticket#destroy.
I think this may have been asked on the list already, but I can’t find
anything in gmane, ruby-forum, or google so I’m lost.
Error:
test_add_message_to_existing_ticket(TicketTest):
ArgumentError: Unknown key(s): group
…
anything in gmane, ruby-forum, or google so I’m lost.
I just ran into this same problem. You need to edit acts_as_paranoid.rb.
In the validate_find_options method (line 125) add the symbol :group.
Ideally I suppose acts_as_paranoid would somehow figure out the keys
that ActiveRecord finds acceptable, then append :with_deleted on to the
lsit, but I don’t know how one would do that.
Someone already submitted a patch to fix this problem here:
Someday I’ll probably move that to RubyForge’s SVN repo too.
If you don’t plan on making any other changes before 1.0, I’d encourage
you to release this now. It’s frustrating to spend the time tracking
down a bug and then find out it’s been fixed previously.