phcpress 2.8.13 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/phcpress/application_controller.rb +4 -3
- data/lib/phcpress/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: c863448003d63a00489975ec55f97cbe848edff2
|
4
|
+
data.tar.gz: 366c5f69c763a78a23543372ba49ba82aa8a8871
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a18eca684c84b3ea7b6610b1ad78686dfe6fd3f8dd6b9fd224fffe25e09e2bc8cf62947e7fd10f6129874d7fa2d7a75c0a28c7d4ef5408ea29eed61b7f5bbdb
|
7
|
+
data.tar.gz: 18bdf1511a582e7b5ac7d940d6f2084edcfb8a07de204e2b8d4a8bc68c63336b5541c83894e4b1e15a600d68e65889dd77d9fb5316dd36cb0134f682aac5254f
|
@@ -4,15 +4,16 @@ module Phcpress
|
|
4
4
|
# Prevent CSRF attacks by raising an exception.
|
5
5
|
# For APIs, you may want to use :null_session instead.
|
6
6
|
protect_from_forgery with: :exception
|
7
|
-
before_action :current_user
|
7
|
+
before_action :current_user
|
8
8
|
|
9
9
|
# Load Engine Helpers in Main App
|
10
10
|
helper Phcnotifi::Engine.helpers
|
11
11
|
# helper Phctitler::Engine.helpers
|
12
12
|
|
13
13
|
# Make Current User Sitewide
|
14
|
-
def current_user
|
15
|
-
|
14
|
+
def current_user
|
15
|
+
return unless session[:user_id]
|
16
|
+
@current_user ||= User.find(session[:user_id])
|
16
17
|
end
|
17
18
|
|
18
19
|
end
|
data/lib/phcpress/version.rb
CHANGED