mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-01 13:41:48 +01:00
Merge pull request #195 from doncruse/master
Removing some intermediate values and shifting HTML formatting to a helper
This commit is contained in:
commit
bcbfe42899
5 changed files with 69 additions and 63 deletions
|
|
@ -48,6 +48,7 @@ class Todo < ActiveRecord::Base
|
|||
scope :completed_before, lambda { |date| where("todos.completed_at < ?", date) }
|
||||
scope :created_after, lambda { |date| where("todos.created_at > ?", date) }
|
||||
scope :created_before, lambda { |date| where("todos.created_at < ?", date) }
|
||||
scope :created_or_completed_after, lambda { |date| where("todos.created_at > ? or todos.completed_at > ?", date, date) }
|
||||
|
||||
def self.due_after(date)
|
||||
where('todos.due > ?', date)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue