I've noticed this strange behavior of turbo frames loading lazily via src
attribute setting:
nav
= turbo_frame_tag 'primary_menu', src: primary_menu_path
: def primary_menu
: respond_to do |format|
: format.turbo_stream
> : format.html { binding.pry ; render plain: 'should not reach this block' }
: end
: end
)> turbo_frame_request?
=> true
For some reason, it is interpreted as regular requested html request, although
turbo_frame_request?
returns => true
. What's causing it and how to fix it?
P.S. primary_menu.turbo_stream.slim
exists for that controller action.
Local versions:
hotwire-rails 0.1.3
@hotwired/turbo-rails 7.0.0-beta.5