HI

I notice on Rails 3.0.4 that the following two statements generate
different results.

State.where(:abbreviation => 'TX').where(:abbreviation => 'NE')
SQL: SELECT `states`.* FROM `states` WHERE (`states`.`abbreviation` =
'TX') OR (`states`.`abbreviation` = 'NE')

State.where(:abbreviation => 'TX').where("abbreviation = 'NE'")
SQL: SELECT `states`.* FROM `states` WHERE (`states`.`abbreviation` =
'TX') AND (`states`.`abbreviation` = 'NE')

Using Rails 3.0.3 they both generated AND clauses which seems to me to
be correct.

Is this a bug or by design please?

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to