Skip to content
Browse files

ActiveRecord associations example on module scopes was illogic

Was using Company when it meant Client.
  • Loading branch information...
1 parent 3088094 commit 45709aead0957b04989fc9de36e5a9cf439b860d @sunny sunny committed Jun 20, 2008
Showing with 4 additions and 3 deletions.
  1. +4 −3 activerecord/lib/active_record/associations.rb
View
7 activerecord/lib/active_record/associations.rb
@@ -582,12 +582,13 @@ def clear_association_cache #:nodoc:
# 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

0 comments on commit 45709ae

Please sign in to comment.
Something went wrong with that request. Please try again.