mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
fix #1164 and fix #1159 whre a localization was wrong and adding brackets at NOT sql statements for older MySQL versions
This commit is contained in:
parent
58641a2fd0
commit
7d5ca16044
3 changed files with 6 additions and 6 deletions
|
|
@ -56,7 +56,7 @@ module ApplicationHelper
|
|||
t('todos.next_actions_due_date.overdue_by', :days => pluralize(days * -1, 'day'))
|
||||
else
|
||||
# more than a week away - relax
|
||||
t('todos.next_actions_due_date.due_in', :days => pluralize(days, 'day'))
|
||||
t('models.preference.due_in', :days => days)
|
||||
end
|
||||
end
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class Project < ActiveRecord::Base
|
|||
named_scope :active, :conditions => { :state => 'active' }
|
||||
named_scope :hidden, :conditions => { :state => 'hidden' }
|
||||
named_scope :completed, :conditions => { :state => 'completed'}
|
||||
named_scope :uncompleted, :conditions => ["NOT state = ?", 'completed']
|
||||
named_scope :uncompleted, :conditions => ["NOT(state = ?)", 'completed']
|
||||
|
||||
validates_presence_of :name
|
||||
validates_length_of :name, :maximum => 255
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ class Todo < ActiveRecord::Base
|
|||
named_scope :active, :conditions => { :state => 'active' }
|
||||
named_scope :active_or_hidden, :conditions => ["todos.state = ? OR todos.state = ?", 'active', 'project_hidden']
|
||||
named_scope :not_completed, :conditions => ['NOT (todos.state = ? )', 'completed']
|
||||
named_scope :completed, :conditions => ["NOT todos.completed_at IS NULL"]
|
||||
named_scope :completed, :conditions => ["NOT(todos.completed_at IS NULL)"]
|
||||
named_scope :are_due, :conditions => ['NOT (todos.due IS NULL)']
|
||||
named_scope :deferred, :conditions => ["todos.completed_at IS NULL AND NOT todos.show_from IS NULL"]
|
||||
named_scope :deferred, :conditions => ["todos.completed_at IS NULL AND NOT(todos.show_from IS NULL)"]
|
||||
named_scope :blocked, :conditions => ['todos.state = ?', 'pending']
|
||||
named_scope :deferred_or_blocked, :conditions => ["(todos.completed_at IS NULL AND NOT todos.show_from IS NULL) OR (todos.state = ?)", "pending"]
|
||||
named_scope :not_deferred_or_blocked, :conditions => ["todos.completed_at IS NULL AND todos.show_from IS NULL AND NOT todos.state = ?", "pending"]
|
||||
named_scope :deferred_or_blocked, :conditions => ["(todos.completed_at IS NULL AND NOT(todos.show_from IS NULL)) OR (todos.state = ?)", "pending"]
|
||||
named_scope :not_deferred_or_blocked, :conditions => ["todos.completed_at IS NULL AND todos.show_from IS NULL AND NOT(todos.state = ?)", "pending"]
|
||||
named_scope :with_tag, lambda { |tag| {:joins => :taggings, :conditions => ["taggings.tag_id = ? ", tag.id] } }
|
||||
named_scope :of_user, lambda { |user_id| {:conditions => ["todos.user_id = ? ", user_id] } }
|
||||
named_scope :hidden,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue