On Jun 9, 12:12 pm, Artyom Bolshakov <[email protected]> wrote: > Hi, > I have a such code: > @posts = Post.where(:created_at <= > Time.now).reverse_order(:created_at).paginate(1, 10) > > Then I run it got this error: > ArgumentError: comparison of Symbol with Time failed > > What wrong with it? I going to find posts created earlier then date > specified.
This works on ruby 1.8, but not on ruby 1.9. Ruby 1.9 defines the inequality methods on Symbol, and Sequel does not override methods defined by ruby. Francois' advice to use a virtual row block has been the recommended way to do this for years. The only reason it works on ruby 1.8 is for backwards compatibility. If there is still documentation that uses inequality methods directly on Symbol, please let me know so that I can correct it. Thanks, 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.
