diff options
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/dashboard.rb | 3 | ||||
-rw-r--r-- | activerecord/test/models/minivan.rb | 6 | ||||
-rw-r--r-- | activerecord/test/models/speedometer.rb | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/activerecord/test/models/dashboard.rb b/activerecord/test/models/dashboard.rb new file mode 100644 index 0000000000..a8a25834b1 --- /dev/null +++ b/activerecord/test/models/dashboard.rb @@ -0,0 +1,3 @@ +class Dashboard < ActiveRecord::Base + set_primary_key :dashboard_id +end
\ No newline at end of file diff --git a/activerecord/test/models/minivan.rb b/activerecord/test/models/minivan.rb new file mode 100644 index 0000000000..c753319a20 --- /dev/null +++ b/activerecord/test/models/minivan.rb @@ -0,0 +1,6 @@ +class Minivan < ActiveRecord::Base + set_primary_key :minivan_id + + belongs_to :speedometer + has_one :dashboard, :through => :speedometer +end
\ No newline at end of file diff --git a/activerecord/test/models/speedometer.rb b/activerecord/test/models/speedometer.rb new file mode 100644 index 0000000000..94743eff8e --- /dev/null +++ b/activerecord/test/models/speedometer.rb @@ -0,0 +1,4 @@ +class Speedometer < ActiveRecord::Base + set_primary_key :speedometer_id + belongs_to :dashboard +end
\ No newline at end of file |