aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/company.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-11-04 11:16:55 +0000
committerJon Leighton <j@jonathanleighton.com>2011-11-04 11:17:56 +0000
commite6cc2ea201857a5f3700f589336df2880564cfea (patch)
treee05f67885b8201f74b9284f6dc1497fd2c4d56ec /activerecord/test/models/company.rb
parent2c67845271f7bd800fa4f902e187c803ab61bb01 (diff)
downloadrails-e6cc2ea201857a5f3700f589336df2880564cfea.tar.gz
rails-e6cc2ea201857a5f3700f589336df2880564cfea.tar.bz2
rails-e6cc2ea201857a5f3700f589336df2880564cfea.zip
Allow the :class_name option for associations to take a symbol.
This is to avoid confusing newbies, and to be consistent with the fact that other options like :foreign_key already allow a symbol or a string.
Diffstat (limited to 'activerecord/test/models/company.rb')
-rw-r--r--activerecord/test/models/company.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb
index c1f7a4171a..78eb4c57ac 100644
--- a/activerecord/test/models/company.rb
+++ b/activerecord/test/models/company.rb
@@ -42,6 +42,7 @@ class Firm < Company
:before_remove => :log_before_remove,
:after_remove => :log_after_remove
has_many :unsorted_clients, :class_name => "Client"
+ has_many :unsorted_clients_with_symbol, :class_name => :Client
has_many :clients_sorted_desc, :class_name => "Client", :order => "id DESC"
has_many :clients_of_firm, :foreign_key => "client_of", :class_name => "Client", :order => "id"
has_many :unvalidated_clients_of_firm, :foreign_key => "client_of", :class_name => "Client", :validate => false