fix for the migration for some linux users, which the AR stubs were not carring over from the migration file to the ShareVisibilityConverter

This commit is contained in:
Maxwell Salzberg 2012-01-18 09:29:00 -08:00
parent 38ad76d9c7
commit 0edb06eef7

View file

@ -1,3 +1,28 @@
#we dont have the enviroment, and it is not carring over from the migration
unless defined?(Person)
class Person < ActiveRecord::Base
belongs_to :owner, :class_name => 'User'
end
end
unless defined?(User)
class User < ActiveRecord::Base
serialize :hidden_shareables, Hash
end
end
unless defined?(Contact)
class Contact < ActiveRecord::Base
belongs_to :user
end
end
unless defined?(ShareVisibility)
class ShareVisibility < ActiveRecord::Base
belongs_to :contact
end
end
class ShareVisibilityConverter class ShareVisibilityConverter
RECENT = 2 # number of weeks to do in the migration RECENT = 2 # number of weeks to do in the migration
def self.copy_hidden_share_visibilities_to_users(only_recent = false) def self.copy_hidden_share_visibilities_to_users(only_recent = false)
@ -21,4 +46,4 @@ class ShareVisibilityConverter
end end
end end
end end
end end