This repository was archived by the owner on May 29, 2020. It is now read-only.
File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ def create
20
20
if user && user . authenticate ( user_params [ :password ] )
21
21
reset_session
22
22
session [ :user_id ] = user . id
23
- format . html { redirect_to root_url , :notice => "Logged in" }
23
+ format . html { redirect_to root_url , :notice => I18n . t ( "helpers.notices.logged_in" ) }
24
24
format . js { head :ok }
25
25
else
26
26
format . html {
27
- flash . now [ :alert ] = "ログインできません。"
27
+ flash . now [ :alert ] = I18n . t ( "helpers.notices.login_failed" )
28
28
@user = User . new ( user_params . permit ( :username ) )
29
29
render "new"
30
30
}
@@ -39,7 +39,7 @@ def create
39
39
def destroy
40
40
reset_session
41
41
respond_to do |format |
42
- format . html { redirect_to root_url , :notice => "Logged out" }
42
+ format . html { redirect_to root_url , :notice => I18n . t ( "helpers.notices.logged_out" ) }
43
43
format . js { head :ok }
44
44
end
45
45
end
Original file line number Diff line number Diff line change 18
18
created : " %{model}を作成しました。"
19
19
updated : " %{model}を更新しました。"
20
20
destroyed : " %{model}を削除しました。"
21
+ logged_in : ログインしました。
22
+ logged_out : ログアウトしました。
23
+ login_failed : ログインできません。
21
24
22
25
views :
23
26
pagination :
You can’t perform that action at this time.
0 commit comments