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

Support for a UUID primary key #60

Closed
swastik opened this issue Sep 2, 2015 · 5 comments
Closed

Support for a UUID primary key #60

swastik opened this issue Sep 2, 2015 · 5 comments

Comments

@swastik
Copy link

swastik commented Sep 2, 2015

Does this gem work with UUID as the primary key?

I looked into the source code, but couldn't find anything. I also tried it on a sample app, but it breaks on this line in readable_scopes.rb:

AND read_marks.user_id        = #{user.id}

It results in something like:

AND read_marks.user_id          = e61422-0e0c-4a49-9a4

Something like:

AND read_marks.user_id          = 'e61422-0e0c-4a49-9a4'

... seems to work. Any ideas?

@ledermann
Copy link
Owner

Using sanitize_sql_array should help. I will check it out tomorrow.

@swastik
Copy link
Author

swastik commented Sep 2, 2015

Thank you!

ledermann added a commit that referenced this issue Sep 3, 2015
@ledermann
Copy link
Owner

@swastik I've just pushed 01f9104. Does it help?

@swastik
Copy link
Author

swastik commented Sep 4, 2015

Yes, it does! Works perfectly now! 😃

@ledermann
Copy link
Owner

Fine, thanks for feedback.

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

No branches or pull requests

2 participants