On Jan 14, 12:05 pm, Luan <[email protected]> wrote:
> Hi Scott,
>
> Thanks. It worked!
>
> items.filter(:category => 'ruby').sql
>    #=> "SELECT * FROM items WHERE (category = 'ruby')"
>
> Same as this
>
> items.filter('category'.to_sym => 'ruby').sql
>
> >   #=> "SELECT * FROM items WHERE (category = 'ruby')"
>
> By the way, I just read your blog last week. I really enjoy your
> example working on associations with sequel.

Be very careful to check that the string you want to turn into a
symbol is a valid column, before calling to_sym.  Otherwise you open
yourself up to a denial of service attack and possible SQL injection.

Jeremy

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