1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- original
+++ mutation 
def self.chown(options = {  })   
  options = options.dup   
  options[:audit] = true unless options.has_key?(:audit)   
  options[:column] ||= :user   
  if options[:column].is_a?(Symbol) then     
    options[:column] = "#{options[:column]}_id"   
  end   
  case options[:from]   
    when nil then     
      raise(ArgumentError, "If you really meant to change ownership of all #{table_name}, specify :all for the :from option.")   
    when :all then     
      chown(options.merge({ :from => [] }))   
    when Array then     
      to = if options[:to].is_a?(ActiveRecord::Base) then       
        options[:to].id     
      else       
        options[:to]     
      end
-     from = options[:from].map do |u|
+     from = nil do |u|       
        if u.is_a?(ActiveRecord::Base) then         
          u.id       
        else         
          u       
        end     
      end