Module: RailsCom::FrameHelper

Defined in:
app/helpers/rails_com/frame_helper.rb

Instance Method Summary collapse

Instance Method Details

#turbo_frame_tagged(id, src: nil, target: nil, **attributes, &block) ⇒ Object



4
5
6
7
8
9
10
# File 'app/helpers/rails_com/frame_helper.rb', line 4

def turbo_frame_tagged(id, src: nil, target: nil, **attributes, &block)
  if request.headers['Turbo-Frame'].blank? && block_given?
    yield block
  else
    turbo_frame_tag(id, src: src, target: target, **attributes, &block)
  end
end