From ec0928076529e8f0b5a4ad58c95cfa1fe6ed5b60 Mon Sep 17 00:00:00 2001 From: Ivan Antropov Date: Sun, 10 Nov 2013 12:28:54 +0700 Subject: Fix insertion of records for hmt association with scope, fix #3548 --- activerecord/test/models/club.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/models') diff --git a/activerecord/test/models/club.rb b/activerecord/test/models/club.rb index 566e0873f1..902a047f62 100644 --- a/activerecord/test/models/club.rb +++ b/activerecord/test/models/club.rb @@ -6,6 +6,8 @@ class Club < ActiveRecord::Base has_one :sponsored_member, :through => :sponsor, :source => :sponsorable, :source_type => "Member" belongs_to :category + has_many :favourites, -> { where(memberships: { favourite: true}) }, through: :memberships, source: :member + private def private_method -- cgit v1.2.3 From 933063188870347b59b35d4f96df21864d0f8f0b Mon Sep 17 00:00:00 2001 From: Roderick van Domburg Date: Sun, 25 Aug 2013 11:22:36 +0200 Subject: Auto-generate stable fixture UUIDs on PostgreSQL. Fixes: #11524 --- activerecord/test/models/uuid_child.rb | 3 +++ activerecord/test/models/uuid_parent.rb | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 activerecord/test/models/uuid_child.rb create mode 100644 activerecord/test/models/uuid_parent.rb (limited to 'activerecord/test/models') diff --git a/activerecord/test/models/uuid_child.rb b/activerecord/test/models/uuid_child.rb new file mode 100644 index 0000000000..a3d0962ad6 --- /dev/null +++ b/activerecord/test/models/uuid_child.rb @@ -0,0 +1,3 @@ +class UuidChild < ActiveRecord::Base + belongs_to :uuid_parent +end diff --git a/activerecord/test/models/uuid_parent.rb b/activerecord/test/models/uuid_parent.rb new file mode 100644 index 0000000000..5634f22d0c --- /dev/null +++ b/activerecord/test/models/uuid_parent.rb @@ -0,0 +1,3 @@ +class UuidParent < ActiveRecord::Base + has_many :uuid_children +end -- cgit v1.2.3