Skip to content

Commit 930d0ac

Browse files
author
Nicholas W. Watson
committed
Merge pull request #19 from nwwatson/master
fixed issue with sign in redirect.
2 parents fd0b62c + 1ef8373 commit 930d0ac

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

app/controllers/entropi_social/user_sessions_controller.rb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@ def new
77
end
88

99
def create
10+
1011
authenticate_user!
11-
12+
1213
if user_signed_in?
13-
respond_to do |format|
14-
format.html {
15-
flash[:notice] = I18n.t("devise.sessions.signed_in")
16-
redirect_to(root_path)
17-
}
18-
end
14+
flash[:notice] = I18n.t("devise.sessions.signed_in")
15+
redirect_to(root_path)
1916
else
2017
flash[:error] = I18n.t("devise.failure.invalid")
2118
render :new
2219
end
20+
2321
end
2422

2523
def destroy

0 commit comments

Comments
 (0)