diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/base.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 335f26d221..12736d3d5b 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -966,17 +966,14 @@ module ActiveRecord #:nodoc: end end - # Enables dynamic finders like <tt>find_by_user_name(user_name)</tt> and - # <tt>find_by_user_name_and_password(user_name, password)</tt> that are turned into - # <tt>where(:user_name => user_name).first</tt> and - # <tt>where(:user_name => user_name, :password => :password).first</tt> - # respectively. Also works for <tt>all</tt> by using <tt>find_all_by_amount(50)</tt> - # that is turned into <tt>where(:amount => 50).all</tt>. + # Enables dynamic finders like <tt>User.find_by_user_name(user_name)</tt> and + # <tt>User.scoped_by_user_name(user_name). Refer to Dynamic attribute-based finders + # section at the top of this file for more detailed information. # # It's even possible to use all the additional parameters to +find+. For example, the # full interface for +find_all_by_amount+ is actually <tt>find_all_by_amount(amount, options)</tt>. # - # Each dynamic finder, scope or initializer/creator is also defined in the class after it + # Each dynamic finder using <tt>scoped_by_*</tt> is also defined in the class after it # is first invoked, so that future attempts to use it do not run through method_missing. def method_missing(method_id, *arguments, &block) if match = DynamicFinderMatch.match(method_id) |