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

incorrect hash key when select alias by using symbol as arguments #20

Open
khiav223577 opened this issue Dec 21, 2016 · 0 comments
Open

Comments

@khiav223577
Copy link

khiav223577 commented Dec 21, 2016

If use string, it's correct

User.pluck_h('id AS d')  # => [{"d"=>2}, {"d"=>1}] 

But if use symbol, the output is wrong

User.pluck_h(:'id AS d') # => [{"id AS d"=>2}, {"id AS d"=>1}] 
yez pushed a commit to yez/pluck_to_hash that referenced this issue Oct 3, 2018
Fixes girishso#20

Extract separation logic into a new function and make the regex into
a constant
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

1 participant