Skip to content

Commit 2cc2b70

Browse files
authored
Add game to sessions controller (for navbar on login page) (#509)
1 parent a2f2d2d commit 2cc2b70

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/controllers/sessions_controller.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,13 @@
22

33
class SessionsController < Devise::SessionsController
44
before_action :load_game, :load_message_count, except: %i[new destroy]
5+
before_action :load_game_for_login, only: %i[new]
6+
7+
def load_game_for_login
8+
@game = Game.instance
9+
end
10+
11+
def new
12+
super
13+
end
514
end

0 commit comments

Comments
 (0)