Colin Law wrote: > 2009/9/7 Salil Gaikwad <[email protected]>: >> (name='salil's' and parent_id= 21) LIMIT 1 > What does the code that generated this sql look like? > > Colin Actuallt i used following code in my Model Category.find(:first, :conditions=>["name= #{self.name} and parent_id= 21"]) it gives error Then i change it as follows
Category.find(:first, :conditions=>["name= ? and "+query, self.name ]) and it works like a magic. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

