HI! Is there any posibility to make a dynamic find that search with "like" sentense? For example: In my table there are records with values: Disc 0, Disc 1, Disc 2, Disc 3, etc... and i want to search all the records with Disc string. It''s possible to do this? Salu2... --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
the.masch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> HI! > Is there any posibility to make a dynamic find that search with "like" > sentense? > For example: > In my table there are records with values: Disc 0, Disc 1, Disc 2, > Disc 3, etc... and i want to search all the records with Disc string. > It''s possible to do this? > > > Salu2...i''m not really sure what you want, does this help: @disc = Disc.find(:all, :conditions=>["DISC LKE ?", disc_string]) http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001376 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Greate!!...Thanks so muchhh!! thats really work!.... Salu2... On Jan 28, 2008 3:38 PM, Phil Tayo <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > the.masch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > HI! > > Is there any posibility to make a dynamic find that search with "like" > > sentense? > > For example: > > In my table there are records with values: Disc 0, Disc 1, Disc 2, > > Disc 3, etc... and i want to search all the records with Disc string. > > It''s possible to do this? > > > > > > Salu2... > > i''m not really sure what you want, does this help: > > @disc = Disc.find(:all, :conditions=>["DISC LKE ?", disc_string]) > > http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001376 > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---