mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add documentation for qualifying table names in conditions hashes
This commit is contained in:
parent
d2dfd340e3
commit
f9c6dcbf7c
1 changed files with 6 additions and 0 deletions
|
@ -236,6 +236,12 @@ module ActiveRecord #:nodoc:
|
|||
#
|
||||
# Student.find(:all, :conditions => { :grade => [9,11,12] })
|
||||
#
|
||||
# When joining tables, nested hashes or keys written in the form 'table_name.column_name' can be used to qualify the table name of a
|
||||
# particular condition. For instance:
|
||||
#
|
||||
# Student.find(:all, :conditions => { :schools => { :type => 'public' }}, :joins => :schools)
|
||||
# Student.find(:all, :conditions => { 'schools.type' => 'public' }, :joins => :schools)
|
||||
#
|
||||
# == Overwriting default accessors
|
||||
#
|
||||
# All column values are automatically available through basic accessors on the Active Record object, but sometimes you
|
||||
|
|
Loading…
Reference in a new issue