Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing test cases for when 0 and 1 are passed to non-boolean scopes #509

Conversation

gkop
Copy link

@gkop gkop commented Feb 2, 2015

@avit, may we re-open #504 based on these failing test cases?

@avit
Copy link
Contributor

avit commented Feb 2, 2015

It looks like this is passing except that your tests expect HAVING count(articles.id) = 0 but the actual SQL query is quoted for different databases as HAVING count(articles.id) = 'f'

See #507

@avit
Copy link
Contributor

avit commented Feb 2, 2015

Ah, never mind. I see this should be an integer count...

@jaredbeck
Copy link
Contributor

@avit, may we re-open #504 based on these failing test cases?

@gkop you meant to say "re-open #503", right?

@gkop
Copy link
Author

gkop commented Feb 3, 2015

Derp, yes you got it Jared!

@gkop
Copy link
Author

gkop commented Feb 3, 2015

Actually @jaredbeck I meant #502 !

@avit
Copy link
Contributor

avit commented Feb 17, 2016

Looking at this again after a long while...

I don't think Ransack should be responsible for converting params anymore, this should probably be happening in the controller anyway. We should probably just support this without getting too clever:

  • Array for params passed as arguments, without converting values
  • Single value for selecting the scope (truthy/falsy), without arguments

@scarroll32
Copy link
Member

Superseded by #742

@scarroll32 scarroll32 closed this Dec 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants