app/models/foreman_tasks/task.rb in foreman-tasks-0.7.5 vs app/models/foreman_tasks/task.rb in foreman-tasks-0.7.6

- old
+ new

@@ -29,17 +29,17 @@ scoped_search :in => :locks, :on => :resource_id, :complete_value => false, :rename => "resource_id", :ext_method => :search_by_generic_resource scoped_search :in => :owners, :on => :id, :complete_value => true, :rename => "owner.id", :ext_method => :search_by_owner scoped_search :in => :owners, :on => :login, :complete_value => true, :rename => "owner.login", :ext_method => :search_by_owner scoped_search :in => :owners, :on => :firstname, :complete_value => true, :rename => "owner.firstname", :ext_method => :search_by_owner - scope :active, -> { where('state != ?', :stopped) } - scope :running, -> { where("state NOT IN ('stopped', 'paused')") } + scope :active, -> { where('foreman_tasks_tasks.state != ?', :stopped) } + scope :running, -> { where("foreman_tasks_tasks.state NOT IN ('stopped', 'paused')") } scope :for_resource, (lambda do |resource| joins(:locks).where(:"foreman_tasks_locks.resource_id" => resource.id, :"foreman_tasks_locks.resource_type" => resource.class.name) end) - scope :for_action_types, (lambda { |action_types| where('label IN (?)', Array(action_types)) }) + scope :for_action_types, (lambda { |action_types| where('foreman_tasks_tasks.label IN (?)', Array(action_types)) }) def input {} end