Hello all,
I tried to get this work for two days… by did not make it right… so
I
decided to call for help…
I have users and comments, like this:
User
has_many :comments
Comment
belongs_to :user
Each comment has a datetime field.
I need to get all users that has no comment in last 90 days (or no
comment
at all)…
I tried:
User.find(:all, :conditions => [“comments.day > ? and comments.id IS
NULL”,
30.days.ago])
But have got an empty set.
In the other hand, User.find(:all, :conditions => “comments.id IS
NULL”)
gives correctly all users without comments…
The problem is when I try to use the date…
Thanks for any help…
Marcello