test/support/fixtures.rb in streamit-0.0.6.2 vs test/support/fixtures.rb in streamit-0.0.7
- old
+ new
@@ -1,14 +1,13 @@
class TestUser < ActiveRecord::Base
self.table_name = "users"
end
-class TestItem < ActiveRecord::Base
- self.table_name = "items"
+class Item < ActiveRecord::Base
end
-class TestWatching < ActiveRecord::Base
- self.table_name = "watchings"
-
- belongs_to :watcher, :class_name => "TestUser", :foreign_key => "user_id"
- belongs_to :watched_item, :class_name => "TestItem", :foreign_key => "item_id"
+class Watching < ActiveRecord::Base
+ belongs_to :watcher, :class_name => "TestUser", :foreign_key => "user_id"
+ belongs_to :item
end
+
+