Module: Coupdoeil::ApplicationHelper

Defined in:
app/helpers/coupdoeil/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#coupdoeil_hovercard_tag(hovercard, options = nil, **attributes_or_options) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'app/helpers/coupdoeil/application_helper.rb', line 5

def coupdoeil_hovercard_tag(hovercard, options = nil, **attributes_or_options, &)
  if options.present?
    attributes = attributes_or_options
  else
    options = attributes_or_options.extract!(*Hovercard::OptionsSet::OPTION_NAMES)
    attributes = attributes_or_options
  end
  hovercard_options = options
  render(Coupdoeil::Tag.new(hovercard:, hovercard_options:, attributes:), &)
end