My code is this <Product id: 44, data: {:my_data=>{“1”=>“5”, “2”=>“test”, “3”=>“tes”}}, view_cout: 1>
How I can write code to search project from “my_data” key or value ?
I have search and found there is one way by hstore we can achieve it ( GitHub - diogob/activerecord-postgres-hstore: Goodbye serialize, hello hstore. Speed up hashes in the database.) but in this sense I have to change current logic of storing data also I have to move the current data to new fild if I use this.
Is there any good way which take less changes or if not then what should I do to create filter for it.