# Converting String maybe

**URL:** <https://www.ruby-forum.com/t/converting-string-maybe/138192>\
**Category:** Rails\
**Created:** [May 20, 2008, 11:47pm UTC](https://www.ruby-forum.com/t/converting-string-maybe/138192 "2008-05-20T23:47:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nameth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/eada6e/32.png) [@nameth](https://www.ruby-forum.com/u/nameth)\
**Post date:** [May 20, 2008, 11:47pm UTC](https://www.ruby-forum.com/t/converting-string-maybe/138192/1 "2008-05-20T23:47:08Z")

</div>

is this possible and if so how? Thanks

fin = “BfAmProducts.find\_all\_by\_bp\_cat\_main\_id\_1 1000”

products = fin

## This is what i want to get

products = BfAmProducts.find\_all\_by\_bp\_cat\_main\_id\_1 1000

##Getting this  
products = “BfAmProducts.find\_all\_by\_bp\_cat\_main\_id\_1 1000”

how can i convert that string?

Thanks for your time

---

<div class="post-metadata">

**Author:** ![nameth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/eada6e/32.png) [@nameth](https://www.ruby-forum.com/u/nameth)\
**Post date:** [May 20, 2008, 11:53pm UTC](https://www.ruby-forum.com/t/converting-string-maybe/138192/2 "2008-05-20T23:53:35Z")

</div>

On 20 May 2008, at 22:46, nameth wrote:

> is this possible and if so how? Thanks
> 
> fin = “BfAmProducts.find\_all\_by\_bp\_cat\_main\_id\_1 1000”

You mean you want to eval the string? (then use eval, and careful  
about what you feed it)

Fred
