Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render full documents for requests with Turbo-Frame: header #534

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/controllers/turbo/frames/frame_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ module Turbo::Frames::FrameRequest
extend ActiveSupport::Concern

included do
layout -> { "turbo_rails/frame" if turbo_frame_request? }
etag { :frame if turbo_frame_request? }

helper_method :turbo_frame_request?, :turbo_frame_request_id
Expand Down
8 changes: 0 additions & 8 deletions app/views/layouts/turbo_rails/frame.html.erb

This file was deleted.

4 changes: 2 additions & 2 deletions test/frames/frame_request_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Turbo::FrameRequestControllerTest < ActionDispatch::IntegrationTest
assert_select "title", count: 1

get tray_path(id: 1), headers: { "Turbo-Frame" => "true" }
assert_select "title", count: 0
assert_select "title", count: 1
end

test "frame request layout includes `head` content" do
Expand All @@ -22,7 +22,7 @@ class Turbo::FrameRequestControllerTest < ActionDispatch::IntegrationTest
end

assert_select "meta[name=test][content=present]"
assert_select "meta[name=alternative][content=present]"
assert_select "meta[name=alternative][content=present]", count: 0
end

test "frame requests get a unique etag" do
Expand Down
Loading