Commit b1b40ef36f4a20adcf6f0f80c30b0b0a675d00de
1 parent
e21366f1
Exists in
staging
and in
4 other branches
Fix task type scope
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/task.rb
... | ... | @@ -242,7 +242,7 @@ class Task < ActiveRecord::Base |
242 | 242 | scope :canceled, :conditions => { :status => Task::Status::CANCELLED } |
243 | 243 | scope :closed, :conditions => { :status => [Task::Status::CANCELLED, Task::Status::FINISHED] } |
244 | 244 | scope :opened, :conditions => { :status => [Task::Status::ACTIVE, Task::Status::HIDDEN] } |
245 | - scope :of, lambda { |type| conditions = type ? "type LIKE '#{type}'" : "1=1"; {:conditions => [conditions]} } | |
245 | + scope :of, lambda { |type| conditions = type ? "tasks.type LIKE '#{type}'" : "1=1"; {:conditions => [conditions]} } | |
246 | 246 | scope :order_by, lambda { |attribute, ord| {:order => "#{attribute} #{ord}"} } |
247 | 247 | scope :like, lambda { |field, value| where("LOWER(#{field}) LIKE ?", "%#{value.downcase}%") if value} |
248 | 248 | scope :pending_all, lambda { |profile, filter_type, filter_text| | ... | ... |