minimum-omniauth-scaffold 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/minimum/omniauth/scaffold/templates/controllers/application_controller.rb +9 -12
- data/lib/minimum/omniauth/scaffold/templates/controllers/sessions_controller.rb +2 -0
- data/lib/minimum/omniauth/scaffold/templates/controllers/top_controller.rb +2 -0
- data/lib/minimum/omniauth/scaffold/templates/rails_config/settings.yml +3 -0
- data/lib/minimum/omniauth/scaffold/templates/views/application.html.erb +1 -1
- data/lib/minimum/omniauth/scaffold/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33892c60d2859d617507140936a030ec64dabc25
|
4
|
+
data.tar.gz: 1368589131c08029d0e2374109e2fa971365aa76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3158e5392c0bcec58f4f7d2e45cda5083860ea88780c5afe2362e155bef373311006d5a3f0ea47c35600b456148182115a4430350f5008f800758d376602783f
|
7
|
+
data.tar.gz: e20e4edf4c4d02c354f63e90b9508e29ba3bb53dfb99a5f81db0a1ac4a2ec2262c91ae046681207d43f393cff3446ba679840468ec6335c5086e090702d7fedd
|
@@ -1,19 +1,16 @@
|
|
1
|
-
before_filter :
|
1
|
+
before_filter :authenticate # ログイン認証
|
2
2
|
before_filter :reset_session_expires # セッション有効期限延長
|
3
3
|
|
4
4
|
private
|
5
5
|
|
6
6
|
# ログイン認証
|
7
|
-
def
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
# リクエストURL保管
|
12
|
-
session[:request_url] = request.url
|
7
|
+
def authenticate
|
8
|
+
unless signed_in?
|
9
|
+
# リクエストURL保管
|
10
|
+
session[:request_url] = request.url
|
13
11
|
|
14
|
-
|
15
|
-
|
16
|
-
end
|
12
|
+
# ルートヘリダイレクト
|
13
|
+
redirect_to :root and return
|
17
14
|
end
|
18
15
|
end
|
19
16
|
|
@@ -29,7 +26,7 @@
|
|
29
26
|
helper_method :current_user
|
30
27
|
|
31
28
|
# ユーザ登録チェック
|
32
|
-
def
|
29
|
+
def signed_in?
|
33
30
|
User.where( id: session[:user_id] ).exists?
|
34
31
|
end
|
35
|
-
helper_method :
|
32
|
+
helper_method :signed_in?
|