Hi,

http://apidock.com/rails/v2.3.8/ActiveRecord/Base/find/class shows:

 mihserf - July 22, 20083 thanks
:conditions examples

:conditions => {:login => login, :password => password}

:conditions => [‘subject LIKE :foo OR body LIKE :foo’, {:foo => ‘woah’}]

(from the book "The Rails Way")




On Sep 9, 2010, at 6:32 AM, PalaniKannan K <kpalanikan...@gmail.com> wrote:

> Hi,
> 
> @table_names = TableName.find(:all, :conditions=>{:column_name => 
> params[:gm], :column_id => params[:id]})    
> 
> Here, I used two conditions to find SQL. This two conditions applies with 
> "AND". I need to apply this two conditions with "OR" condition. 
> 
> Applying "|" or "||"symbol fails... How I can apply OR condition, Kinldy help 
> me.
> 
> 
> 
> -- 
> With Regards
> Palani Kannan. K
> Office: +49-531-2616-226
> Mobile: +4917647098166
> 
> -- 
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to