Fix further obsolete finders w/cond. in Filters

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/6827/head
Alex Coles 9 years ago
parent 8ea8a13a8c
commit df4bb1d5e8
  1. 2
      app/models/cost_query/filter/category_id.rb
  2. 2
      app/models/cost_query/filter/fixed_version_id.rb

@ -27,7 +27,7 @@ class CostQuery::Filter::CategoryId < Report::Filter::Base
end
def self.available_values(*)
categories = Category.find :all, conditions: { project_id: Project.visible.map(&:id) }
categories = Category.where(project_id: Project.visible.map(&:id))
categories.map { |c| ["#{c.project.name} - #{c.name} ", c.id] }.sort_by { |a| a.first.to_s + a.second.to_s }
end
end

@ -27,7 +27,7 @@ class CostQuery::Filter::FixedVersionId < Report::Filter::Base
end
def self.available_values(*)
versions = Version.find :all, conditions: { project_id: Project.visible.map(&:id) }
versions = Version.where(project_id: Project.visible.map(&:id))
versions.map { |a| ["#{a.project.name} - #{a.name}", a.id] }.sort_by { |a| a.first.to_s + a.second.to_s }
end
end

Loading…
Cancel
Save