Permalink
Browse files

change activerecord query conditions example to avoid 'type' as colum…

…n name

'Type' is a reserved column for STI.  Changed conditions example to
avoid using that column name as an example.  The example isn't
STI-related (and mentioning STI here is needless clutter), so changing
to avoid accidentally encouraging users to use 'type' as a column name
for other purposes.
  • Loading branch information...
1 parent 532e6d5 commit e552fe16d43d89c37b85cf3d5e8c8e5afe150529 Steve Bourne committed Oct 12, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/base.rb
@@ -115,8 +115,8 @@ module ActiveRecord #:nodoc:
# 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.joins(:schools).where(:schools => { :type => 'public' })
- # Student.joins(:schools).where('schools.type' => 'public' )
+ # Student.joins(:schools).where(:schools => { :category => 'public' })
+ # Student.joins(:schools).where('schools.category' => 'public' )
#
# == Overwriting default accessors
#

0 comments on commit e552fe1

Please sign in to comment.