Storing attributes and values dynamically to an hstore column

I want to store data in an hstore column but I want the user to input
attribute dynamically. Like {“x” => “y”} is stored where user enters
both x
and y. how can I do that?

I worked on a gem that allows you do just this a while ago. Once I find
where the source is stashed, I’ll post it up

Thanks