diff options
author | Kir Shatrov <shatrov@me.com> | 2017-01-03 10:12:47 -0500 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2017-01-09 13:08:33 -0500 |
commit | 8312a0d22212798864f142b5a94805e0baa6c562 (patch) | |
tree | 3ce858cb37e94783c75d6eda171a6dc4d3b2dae6 /activerecord/test/models | |
parent | 80bf3384152a640a36682db875241e2d92db511f (diff) | |
download | rails-8312a0d22212798864f142b5a94805e0baa6c562.tar.gz rails-8312a0d22212798864f142b5a94805e0baa6c562.tar.bz2 rails-8312a0d22212798864f142b5a94805e0baa6c562.zip |
Deprecate reflection class name to accept a class
The idea of `class_name` as an option of reflection is that passing a
string would allow us to lazy autoload the class.
Using `belongs_to :client, class_name: Customer` is eagerloading models more than necessary
and creating possible circular dependencies.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/models/user.rb b/activerecord/test/models/user.rb index 47649e0a77..c099c57e37 100644 --- a/activerecord/test/models/user.rb +++ b/activerecord/test/models/user.rb @@ -5,7 +5,7 @@ class User < ActiveRecord::Base has_secure_token :auth_token has_and_belongs_to_many :jobs_pool, - class_name: Job, + class_name: "Job", join_table: "jobs_pool" end |