Strange acts_as_paranoid behavior

Using the acts_as_paranoid plugin with rails 1.1.4 (model also uses
acts_as_threaded and acts_as_taggable) and getting some unexplainable
behavior.

The following tests:
assert_equal Conv.count, num
assert_equal Conv.count_with_deleted, CONVS_TOTAL

Produce the following SQL:

SQL (0.000000) SELECT count(*) AS count_all FROM convs WHERE ((
convs.deleted_at IS NULL OR convs.deleted_at > ‘2006-07-09 19:46:18’ )
AND (
convs.deleted_at IS NULL OR convs.deleted_at > ‘2006-07-09 19:46:18’ ))

SQL (0.000000) SELECT count(*) AS count_all FROM convs WHERE
(convs.deleted_at IS NULL OR convs.deleted_at > ‘2006-07-09 19:46:18’)

As you can see, both statements have 1 too many AND clauses (the first
should
have 1, the second none). Other methods (e.g. find) exhibit the same
behavior.

I’m new to RoR and after googling all day I’ve no idea why this would be
happening. Any help appreciated.

Thanks in advance.

Brittain

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs