# Dynamic finds

**URL:** <https://www.ruby-forum.com/t/dynamic-finds/127379>\
**Category:** Rails\
**Created:** [January 28, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/dynamic-finds/127379 "2008-01-28T19:58:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 28, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/dynamic-finds/127379/1 "2008-01-28T19:58:45Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 28, 2008, 9:38pm UTC](https://www.ruby-forum.com/t/dynamic-finds/127379/2 "2008-01-28T21:38:39Z")

</div>

removed\_email\_address@domain.invalid 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])

> **[ActiveRecord::Base](https://api.rubyonrails.org/classes/ActiveRecord/Base.html)**
>
> Active Record Active Record objects don't specify their attributes directly, but rather infer them from the table definition with which they're linked.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 28, 2008, 10:13pm UTC](https://www.ruby-forum.com/t/dynamic-finds/127379/3 "2008-01-28T22:13:22Z")

</div>

Greate!!..Thanks so muchhh!! thats really work!..

Salu2…
