{"push_id":2921444347,"size":1,"distinct_size":1,"ref":"refs/heads/value-mapping","head":"6df2b94cf5bb11c0f218a7583da98e5d3f496d02","before":"3ae582eeb8d71e49b09d860cdbbb17078cf9518b","commits":[{"sha":"6df2b94cf5bb11c0f218a7583da98e5d3f496d02","author":{"name":"Adam Ruzicka","email":"a9133a8013e46daa5a01486a3225fed449db2c77@redhat.com"},"message":"Allow value mapping at search time\n\nBefore this patch scoped_search allowed to define value mappings using the\ncomplete_value, but these mappings were static. This patch introduces dynamic\nvalue mapping which is resolved at search time, instead of at definition time.\nThis allows us to do searches like\n\nscoped_search on: :id,\n  value_translation: ->(value) { value == 'current' ? User.current.id : value },\n  validator: ->(value) { value =~ /\\d+/ || value == 'current' },\n  special_values: %w(current)\n\nPlease note the validations are run on the not yet translated input as provided\nby the user.","distinct":true,"url":"https://api.github.com/repos/adamruzicka/scoped_search/commits/6df2b94cf5bb11c0f218a7583da98e5d3f496d02"}]}
{"actor":{"display_login":"adamruzicka"}}