Skip to content

Instantly share code, notes, and snippets.

@dcyoung-dev
Created October 4, 2022 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcyoung-dev/cec9eb965c5beba4f97f8dc97e67c0c1 to your computer and use it in GitHub Desktop.
Save dcyoung-dev/cec9eb965c5beba4f97f8dc97e67c0c1 to your computer and use it in GitHub Desktop.
module TurboFrameHelpers
def turbo_frame_id(*ids)
ids.map { |id| id.respond_to?(:to_key) ? ActionView::RecordIdentifier.dom_id(id) : id }.join("_")
end
end
RSpec.configure do |config|
config.include TurboFrameHelpers
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment