aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-10-20 16:57:47 -0600
committerSean Griffin <sean@seantheprogrammer.com>2015-10-20 16:57:47 -0600
commit5c32f41d5258743500345db34839a21139676f8e (patch)
treebe9d7d97069165f2f9a3a72e56195599efd03a09 /activerecord/test/models
parentd94ae72a5259c31ea510e6341bbbf4e920312ebe (diff)
parentdf94dabb374de5a109de0756c4c19b18375cd5af (diff)
downloadrails-5c32f41d5258743500345db34839a21139676f8e.tar.gz
rails-5c32f41d5258743500345db34839a21139676f8e.tar.bz2
rails-5c32f41d5258743500345db34839a21139676f8e.zip
Fix merge conflicts for #19938
This is a separate commit, as it is not just a changelog conflict. Want to point out the changes in the code
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/developer.rb2
-rw-r--r--activerecord/test/models/mentor.rb3
-rw-r--r--activerecord/test/models/project.rb1
3 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/models/developer.rb b/activerecord/test/models/developer.rb
index 7c5941b1af..9a907273f8 100644
--- a/activerecord/test/models/developer.rb
+++ b/activerecord/test/models/developer.rb
@@ -15,6 +15,8 @@ class Developer < ActiveRecord::Base
end
end
+ belongs_to :mentor
+
accepts_nested_attributes_for :projects
has_and_belongs_to_many :shared_computers, class_name: "Computer"
diff --git a/activerecord/test/models/mentor.rb b/activerecord/test/models/mentor.rb
new file mode 100644
index 0000000000..11f1e4bff8
--- /dev/null
+++ b/activerecord/test/models/mentor.rb
@@ -0,0 +1,3 @@
+class Mentor < ActiveRecord::Base
+ has_many :developers
+end \ No newline at end of file
diff --git a/activerecord/test/models/project.rb b/activerecord/test/models/project.rb
index 5328330653..b034e0e267 100644
--- a/activerecord/test/models/project.rb
+++ b/activerecord/test/models/project.rb
@@ -1,4 +1,5 @@
class Project < ActiveRecord::Base
+ belongs_to :mentor
has_and_belongs_to_many :developers, -> { distinct.order 'developers.name desc, developers.id desc' }
has_and_belongs_to_many :readonly_developers, -> { readonly }, :class_name => "Developer"
has_and_belongs_to_many :non_unique_developers, -> { order 'developers.name desc, developers.id desc' }, :class_name => 'Developer'