From ab07c2362e994ff14b019decc52332a96c425736 Mon Sep 17 00:00:00 2001 From: "Timothy N. Tsvetkov" Date: Thu, 31 Mar 2011 03:27:14 +0400 Subject: [PATCH] LOL. Platform should belongs_to parent platform instead of has_one --- app/models/platform.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/platform.rb b/app/models/platform.rb index 53e8dc828..b16fbcdd1 100644 --- a/app/models/platform.rb +++ b/app/models/platform.rb @@ -1,5 +1,5 @@ class Platform < ActiveRecord::Base - has_one :parent, :class_name => 'Platform', :foreign_key => 'parent_platform_id' + belongs_to :parent, :class_name => 'Platform', :foreign_key => 'parent_platform_id' has_many :repositories, :dependent => :destroy validate :name, :presence => true, :uniqueness => true