Hi all, How do we add a conditions in a ActiveRecord find method when the parameter is available?
Lets say I want to add this category conditions when the parameter from the client: Product.find(:all, :conditions => [ "c.id = ?", params[:catid]) Can we dynamically add that conditions to the find method when it is available? Or do I have to manually make an conditional statement when the parameter is available then give a different find method? Thanks in advance. -- If you can't believe in God the chances are your God is too small. Read my blog: http://joshuajava.wordpress.com/ Follow me on twitter: http://twitter.com/jpartogi --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] 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 -~----------~----~----~----~------~----~------~--~---

