Hi Schalk Just use:
@states = States.find(:all, :conditions => ["country=? OR country='International'", LOCALE]) Jan On 21 okt, 12:50, Schalk Neethling <[EMAIL PROTECTED]> wrote: > Hi there everyone, > > How does one set-up a SQL OR query in Rails. > > I have the following SQL query: > > select state, state_abbr, country from states where country = 'Country' > or country = 'International' order by state asc; > > Now in Rails: > > @states = States.find(:all, :conditions => [:country => LOCALE, :country > => 'International']) > > But the above will do a SQL AND query. What is the right keyword to use > between those two conditions to turn this into a OR query? > > Thanks! > Schalk --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---