Reputation: 185
How to search in hash column on Postgresql
?
serialize :properties, Hash
add_column :products, :properties, :text
Upvotes: 0
Views: 1416
Reputation: 5204
You can only use sql LIKE
operation to search in the text column.
You can switch to postgresql that has native support of hstore columns or migrate to Rails 5 that support json type column. Rails documentation
Upvotes: 1