Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

deleted_after_time / deleted_before_time scopes always return empty set #107

Open
serggl opened this issue Apr 2, 2013 · 2 comments
Open

Comments

@serggl
Copy link

serggl commented Apr 2, 2013

Here is an example:

Installation.deleted_after_time(Time.now)

this will produce

SELECT "installations".* FROM "installations" 
WHERE ("installations"."deleted_at" IS NULL) AND (deleted_at > '2013-04-02 05:29:26.156025')

As you can see from WHERE clause that it will never return values.

@chuckg
Copy link
Collaborator

chuckg commented Apr 3, 2013

Looks like you either:

a) have a fix for it already (in this pull request:
https://github.com/goncalossilva/rails3_acts_as_paranoid/pull/106/files)

or

b) created the bug on your local dev (in the very same pull request)

I'm not sure which without digging in further, but it seems like the former is true. Would you mind testing,
fixing, and submitting as a separate pull request?

On Mon, Apr 1, 2013 at 11:20 PM, Sergey A. Glukhov <notifications@github.com

wrote:

Here is an example:

Installation.deleted_after_time(Time.now)

this will produce

SELECT "installations".* FROM "installations" WHERE ("installations"."deleted_at" IS NULL) AND (deleted_at > '2013-04-02 05:29:26.156025')

As you can see from WHERE clause that it will never return values.


Reply to this email directly or view it on GitHubhttps://github.com//issues/107
.

@serggl
Copy link
Author

serggl commented Apr 3, 2013

I have fixed the pull request - the last commit was about this issue, but didn't either caused or fixed it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants