Skip to content

Instantly share code, notes, and snippets.

@michalkorzawski
Created August 15, 2022 14:35
Show Gist options
  • Save michalkorzawski/6a8654f24036ad7fc86aa73f41800c58 to your computer and use it in GitHub Desktop.
Save michalkorzawski/6a8654f24036ad7fc86aa73f41800c58 to your computer and use it in GitHub Desktop.
def results
cable_ready.morph(
children_only: true,
selector: '#id_of_a_dom_element',
html: render(
PaginationComponent.new(
pagy: pagy,
params_hash: params_hash.to_json,
collection: collection
), layout: false
)).morph(
selector: '#query',
html: "<input type='hidden' name='query' id='query' value='#{query}'>"
)
morph :nothing
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment