diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-12-18 16:08:20 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-12-18 16:08:20 +0000 |
commit | d4d8096429cc9a97efbde63ef37cd1cc7d12708c (patch) | |
tree | 6ab3b13fa0a37e02876d9ac808e5ba00ea8d967b /app/models/user.rb | |
parent | c0a3dc4571090fc553fd608cf1ac83e21f0290f4 (diff) | |
parent | 6d587c328b7d58fb322bd9cf490b213c3ff1ffad (diff) |
Merge branch 'brakeman_fixes' into rails-3-develop
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 1c6dc0eb0..c953e52f2 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -264,11 +264,9 @@ class User < ActiveRecord::Base # Returns list of requests which the user hasn't described (and last # changed more than a day ago) def get_undescribed_requests - info_requests.find( - :all, - :conditions => [ 'awaiting_description = ? and ' + InfoRequest.last_event_time_clause + ' < ?', - true, Time.now() - 1.day - ] + info_requests.where( + "awaiting_description = ? and #{ InfoRequest.last_event_time_clause } < ?", + true, 1.day.ago ) end |