]> source.dussan.org Git - redmine.git/commitdiff
Adding missing setter for Query#available_columns
authorEric Davis <edavis@littlestreamsoftware.com>
Tue, 20 Apr 2010 15:42:52 +0000 (15:42 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Tue, 20 Apr 2010 15:42:52 +0000 (15:42 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3685 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/query.rb

index 20f6ea67153cc7fca16ddf972101cd2c026fad3a..f697a721df6f65032493a4b32db157f77fcd0f08 100644 (file)
@@ -276,6 +276,14 @@ class Query < ActiveRecord::Base
                             IssueCustomField.find(:all)
                            ).collect {|cf| QueryCustomFieldColumn.new(cf) }      
   end
+
+  def self.available_columns=(v)
+    self.available_columns = (v)
+  end
+  
+  def self.add_available_column(column)
+    self.available_columns << (column) if column.is_a?(QueryColumn)
+  end
   
   # Returns an array of columns that can be used to group the results
   def groupable_columns