mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-05 07:21:48 +01:00
start fixing deprecation warnings
This commit is contained in:
parent
0bc9b0397a
commit
ebff4cfc0c
9 changed files with 74 additions and 79 deletions
|
|
@ -1,13 +1,13 @@
|
|||
class Context < ActiveRecord::Base
|
||||
|
||||
has_many :todos, :dependent => :delete_all, :include => :project,
|
||||
:order => 'todos.due IS NULL, todos.due ASC, todos.created_at ASC'
|
||||
has_many :todos, -> { order("todos.due IS NULL, todos.due ASC, todos.created_at ASC").includes(:project) }, :dependent => :delete_all
|
||||
|
||||
has_many :recurring_todos, :dependent => :delete_all
|
||||
belongs_to :user
|
||||
|
||||
scope :active, :conditions => { :state => :active }
|
||||
scope :hidden, :conditions => { :state => :hidden }
|
||||
scope :closed, :conditions => { :state => :closed }
|
||||
scope :active, -> { where state: :active }
|
||||
scope :hidden, -> { where state: :hidden }
|
||||
scope :closed, -> { where state: :closed }
|
||||
scope :with_name, lambda { |name| where("name LIKE ?", name) }
|
||||
|
||||
acts_as_list :scope => :user, :top_of_list => 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue