You're welcome Luan, glad it helped and glad you like the blog. Scott
On Fri, Jan 14, 2011 at 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. > > Thanks, > Luan > > On Jan 14, 1:42 pm, 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.
