Re: Dynamic finds

masch
Mon, 28 Jan 2008 21:12:47 -0000

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/.
>
>
> >
>