See the String function to_sym. I think that should do what you need.

Scott

On Fri, Jan 14, 2011 at 11:42 AM, Luan <[email protected]> wrote:

> Hi All,
>
> Here is an example from the doc:
>
> items.filter(:category => 'ruby').sql
>  #=> "SELECT * FROM items WHERE (category = 'ruby')"
>
>
> What if I don't know my column name until at runtime.
> How would I replace :category by a dynamic column. For example:
> like :name or :email
>
> I understand that I can use custom string. I wonder if there's a way
> to do dynamic with hash value.
>
> Thanks,
> Luan
>
> --
> You received this message because you are subscribed to the Google Groups
> "sequel-talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<sequel-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/sequel-talk?hl=en.
>
>


-- 
Scott
http://steamcode.blogspot.com/

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-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/sequel-talk?hl=en.

Reply via email to