Skip to content

Instantly share code, notes, and snippets.

@dcyoung-dev
Created October 4, 2022 10:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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