Skip to content

Commit 7718b06

Browse files
committed
Use find_by id: so exception is not raised
1 parent e336fe0 commit 7718b06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gem/terminalwire-rails/lib/generators/terminalwire/install/templates/application_terminal.rb.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ class ApplicationTerminal < Thor
1616
end
1717

1818
def current_user
19-
@current_user ||= User.find(session["user_id"])
19+
@current_user ||= User.find_by(id: session["user_id"])
2020
end
2121
end

0 commit comments

Comments
 (0)