Thanks !
For search reference, a placeholder also does the job :
Job.filter(:parent_id => nil, :state => 'FINISHED').filter('updated_at
< ?',time).sql
Daniel
On Jan 31, 6:04 pm, Jeremy Evans <[email protected]> wrote:
> On Jan 31, 2:52 am, _dewie_ <[email protected]> wrote:
>
> > Hi,
>
> > After upgrading from ruby 1.8.7 to 1.9.2 i get an error when selecting
> > a time smaller then:
>
> > time = Time.now - (84600 * 12)
> > ruby-1.9.2-p136 :016 > JobServer::Job.filter(:created_at < time).sql
> > ArgumentError: comparison of Symbol with Time failed
>
> > Is it possible to have a working solution in 1.8.7 and 1.9.2 ?
>
> Use a virtual row:
>
> JobServer::Job.filter{created_at < time}.sql
>
> Or convert the symbol to an identifier:
>
> JobServer::Job.filter(:created_at.identifier < time).sql
>
> 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.