Hi, I would like to do something simple yet I''m confused. Lets say I have a table with 2 fields: rank, updated_at. I would like to show all records matching this condition: rank = rank ? (Time.now.to_time ? Updated_at.to_time) As you can see this is supposed to be a calculation on the field. How do I write a query to show this? I''ve tried with_scope, and regular find but did not succeed. Please advice Thanks Adi -- Posted via http://www.ruby-forum.com/.
hi, equality on dates does rarely work. it is better to do sometthing like date1 - 1 sec < date2 && date2 < date1 + 1 sec I don''t understand either why you need .to_time for Time.now and update_at ______________ Heri R. http://sprinj.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060807/c77a08ef/attachment.html