I'm trying to add a custom filter field for an hstore field.
In activeadmin: filter :by_title, label: 'Title', as: :string
In model :
ransacker :by_title do |parent|
Arel::Nodes::InfixOperation.new('->',
parent.table[:title_translations], Arel::Nodes.build_quoted('en'))
end
This code is searching creating the correct query depending on the activeadmin selection (contains, equals, starts_with or ends_with)
I use the hstore to store title for multiple locales. I'd like to search in ALL locale. Not only en, but fr, es, ru, etc