diff options
author | Sunny Ripert <negatif@gmail.com> | 2008-06-20 23:51:26 +0200 |
---|---|---|
committer | Sunny Ripert <negatif@gmail.com> | 2008-06-20 23:51:26 +0200 |
commit | 45709aead0957b04989fc9de36e5a9cf439b860d (patch) | |
tree | 57b6412641daa05f353d8cfe2430f961b931b031 | |
parent | 308809408476cd9981cc8e8be503c0b5145b9736 (diff) | |
download | rails-45709aead0957b04989fc9de36e5a9cf439b860d.tar.gz rails-45709aead0957b04989fc9de36e5a9cf439b860d.tar.bz2 rails-45709aead0957b04989fc9de36e5a9cf439b860d.zip |
ActiveRecord associations example on module scopes was illogic
Was using Company when it meant Client.
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index a3d1bbbada..9479296b90 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -582,12 +582,13 @@ module ActiveRecord # has_many :clients # end # - # class Company < ActiveRecord::Base; end + # class Client < ActiveRecord::Base; end # end # end # - # When Firm#clients is called, it will in turn call <tt>MyApplication::Business::Company.find(firm.id)</tt>. If you want to associate - # with a class in another module scope, this can be done by specifying the complete class name. Example: + # When <tt>Firm#clients</tt> is called, it will in turn call <tt>MyApplication::Business::Client.find_all_by_firm_id(firm.id)</tt>. + # If you want to associate with a class in another module scope, this can be done by specifying the complete class name. + # Example: # # module MyApplication # module Business |