Hi there,
I'm building a private message system for one of my sites. I'm now
trying to give users the delete messages in their inbox (not destroy
the records but put "archived = true" in them), so they don't come up
anymore. This is important because the sender needs to have the
message in his sent items.
Everything is set up but when I do the database query, it simply
returns no messages.
This was my query before the archive feature and shows records:
@messages = Message.find_all_by_to(current_user.id, :order =>
"created_at DESC")
And this is the query with archive feature and shows no records:
@messages = Message.find_all_by_to(current_user.id, :conditions =>
{:archived, :order => "created_at DESC")
The strange thing is that Mongrel shows the right query:
Message Load (0.6ms) SELECT * FROM "messages" WHERE
("messages"."archived" = 'false') AND ("messages"."to" = 3) ORDER BY
created_at DESC
But I don't see any messages anymore (archived and not archived).
Hope you can help me.
pl
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---