diff --git a/app/models/project.rb b/app/models/project.rb index 0d2dfc29c..29578df6e 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -810,7 +810,7 @@ class Project < ActiveRecord::Base # Copies queries from +project+ def copy_queries(project) project.queries.each do |query| - new_query = Query.new + new_query = ::Query.new new_query.attributes = query.attributes.dup.except("id", "project_id", "sort_criteria") new_query.sort_criteria = query.sort_criteria if query.sort_criteria new_query.project = self