phcpresspro 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21fdaae00172df1e9b1c549b5131e0c884b2d52a
|
4
|
+
data.tar.gz: 4bcbb4c3160342d728bc6b618180788f5315151c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc22663c8cc052027612c2f9ab73b8769c8afc9b67f544c8d8b47fea0fbe0b68ef5c71a06cc34740dcb60d7a6c5742bebf79dfb37a0ea06ab225ae74b5c565d7
|
7
|
+
data.tar.gz: 334f031efedbf019b2152f87d7be5a180026ae68df142b22d21f1700f0df5f1e7b73be5b6be582f49bc9274e7b3a9d122ded2136a9f9328b3caeb1d59e69ed00
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
|
1
|
+
####Common Commands
|
2
2
|
|
3
3
|
**Installation:**
|
4
4
|
|
5
|
-
gem 'phcpresspro', '~> 2.
|
6
|
-
rake
|
5
|
+
gem 'phcpresspro', '~> 2.1'
|
6
|
+
rake phcpresspro:install:migrations
|
7
|
+
rake assets:clobber
|
8
|
+
rake assets:precompile
|
7
9
|
|
8
10
|
**Notes:**
|
@@ -5,9 +5,8 @@ module Phcpresspro
|
|
5
5
|
# For APIs, you may want to use :null_session instead.
|
6
6
|
before_filter :require_user
|
7
7
|
protect_from_forgery with: :exception
|
8
|
-
|
9
|
-
|
10
8
|
|
9
|
+
# User Helpers
|
11
10
|
def require_user
|
12
11
|
unless current_user
|
13
12
|
session[:last_url] = request.get? ? url_for(params) : url_for
|
@@ -26,7 +25,7 @@ module Phcpresspro
|
|
26
25
|
end
|
27
26
|
helper_method :new_login_url
|
28
27
|
|
29
|
-
# Load Helpers
|
28
|
+
# Load PHCEngine Helpers
|
30
29
|
helper Phctitleseo::Engine.helpers
|
31
30
|
helper Phcnotifi::Engine.helpers
|
32
31
|
|
@@ -56,6 +56,11 @@ module Phcpresspro
|
|
56
56
|
|
57
57
|
private
|
58
58
|
|
59
|
+
# Define Current User
|
60
|
+
def current_user
|
61
|
+
@_current_user ||= AuthRocket::Session.from_token(session[:ar_token]).try(:user)
|
62
|
+
end
|
63
|
+
|
59
64
|
# Common Callbacks
|
60
65
|
def set_blog_post
|
61
66
|
@blog_post = Blog::Post.find(params[:id])
|
@@ -50,6 +50,11 @@ module Phcpresspro
|
|
50
50
|
|
51
51
|
private
|
52
52
|
|
53
|
+
# Define Current User
|
54
|
+
def current_user
|
55
|
+
@_current_user ||= AuthRocket::Session.from_token(session[:ar_token]).try(:user)
|
56
|
+
end
|
57
|
+
|
53
58
|
# Common Callbacks
|
54
59
|
def set_news_post
|
55
60
|
@news_post = News::Post.find(params[:id])
|
data/lib/phcpresspro/version.rb
CHANGED