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: f0b43d2458afcd360bd25119050fdaeae4fdefe4
4
- data.tar.gz: 1b5b4a54e27210e71cb8f1f97c71c2424c972c4b
3
+ metadata.gz: 21fdaae00172df1e9b1c549b5131e0c884b2d52a
4
+ data.tar.gz: 4bcbb4c3160342d728bc6b618180788f5315151c
5
5
  SHA512:
6
- metadata.gz: e08c46b2d3414c01e26e134292a9b52492d3681ef4f9ccdfe49fa6b9d9d9ba29a3f582d67e3eae1b963e0161ba9c09c661076d8eaf86fb8cf00023aef8601053
7
- data.tar.gz: 450bf00abab2cb1b955871da6010d019bd15f8de4b4a08daf1f252397a1e811db6622e6e9861fa6893ab3037e106b2b428868d8a9fedc4ba9ee4543f4c8846e7
6
+ metadata.gz: dc22663c8cc052027612c2f9ab73b8769c8afc9b67f544c8d8b47fea0fbe0b68ef5c71a06cc34740dcb60d7a6c5742bebf79dfb37a0ea06ab225ae74b5c565d7
7
+ data.tar.gz: 334f031efedbf019b2152f87d7be5a180026ae68df142b22d21f1700f0df5f1e7b73be5b6be582f49bc9274e7b3a9d122ded2136a9f9328b3caeb1d59e69ed00
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
- *****Common Commands
1
+ ####Common Commands
2
2
 
3
3
  **Installation:**
4
4
 
5
- gem 'phcpresspro', '~> 2.0', '>= 2.0.1'
6
- rake phcpress:install:migrations
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])
@@ -1,3 +1,3 @@
1
1
  module Phcpresspro
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcpresspro
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BradPotts