I want to be able to query an hStore column on PG database and return ONLY the values corresponding to a specific key.
The data looks like this: (keep in mind the :data is a postgresql hStore)
[ id: 2, data: {"tags"=>"Ruby, Objects", "type"=>"video", "title"=>"RubyTapas: Blocks, Procs, and Lambdas"},
id: 3, data: {"tags"=>"JavaScript, Objects", "type"=>"video", "title"=>"RubyTapas: Blocks, Procs, and Lambdas"} ]
I want to do something to the effect of this:
Model.uniq.pluck(:tags)
And the output I expect is:
Ruby, Objects, JavaScript
*I am strictly trying to implement this with activerecord and postgresql.