Skip to content
Merged
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
6 changes: 5 additions & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
<link rel="icon" href="/icon.png?v=2" type="image/png">
<link rel="apple-touch-icon" href="/icon.png?v=2">

<%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
<%#
Only the built file (bun run build:css). `:app` also linked the Tailwind source, whose
`@import "tailwindcss"` 404s in the browser, and tailwindcss-rails' copy of the same styles.
%>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
</head>

Expand Down
7 changes: 7 additions & 0 deletions test/controllers/sessions_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ class SessionsControllerTest < ActionDispatch::IntegrationTest
assert_includes response.body, "Sign in to Stash"
end

test "the layout links only the built stylesheet" do
get sign_in_path

assert_select "link[rel=stylesheet]", count: 1
assert_select "link[rel=stylesheet][href^=?]", "/assets/application-"
end

test "the Weave button submits without Turbo, so the browser follows the redirect to Weave" do
with_fake_weave do
get sign_in_path
Expand Down
Loading