]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/gems/composite_primary_keys-1.1.0/test/fixtures/suburb.rb
Freezing composite primary key so that we can apply TomH's patch to it, and that...
[rails.git] / vendor / gems / composite_primary_keys-1.1.0 / test / fixtures / suburb.rb
diff --git a/vendor/gems/composite_primary_keys-1.1.0/test/fixtures/suburb.rb b/vendor/gems/composite_primary_keys-1.1.0/test/fixtures/suburb.rb
new file mode 100644 (file)
index 0000000..9304535
--- /dev/null
@@ -0,0 +1,6 @@
+class Suburb < ActiveRecord::Base\r
+  set_primary_keys :city_id, :suburb_id\r
+  has_many :streets,  :foreign_key => [:city_id, :suburb_id]\r
+  has_many :first_streets,  :foreign_key => [:city_id, :suburb_id], \r
+          :class_name => 'Street', :conditions => "streets.name = 'First Street'"\r
+end
\ No newline at end of file