Skip to content

Instantly share code, notes, and snippets.

@michalkorzawski
Created August 15, 2022 14:15
Show Gist options
  • Save michalkorzawski/c612e132edb0882d17fe2690579b2d78 to your computer and use it in GitHub Desktop.
Save michalkorzawski/c612e132edb0882d17fe2690579b2d78 to your computer and use it in GitHub Desktop.
def results
params_hash = element.dataset['params-hash'].present? ? JSON.parse(element.dataset['params-hash']) : filtered_params
query = element.value.presence || params_hash['query']
params_hash['query'] = query
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment