phcpress 2.7.5 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/app/controllers/phcpress/application_controller.rb +1 -0
- data/app/controllers/phcpress/blog/posts_controller.rb +1 -0
- data/app/controllers/phcpress/news/posts_controller.rb +2 -2
- data/app/models/phcpress/blog/post.rb +7 -4
- data/app/models/phcpress/news/post.rb +7 -4
- data/lib/phcpress/version.rb +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffbd9973cfe2f102d8daf206d78869f04491bb40
|
4
|
+
data.tar.gz: 9906e3c36ff98579d9053fa767556bd6cd85b896
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa4f1a3997acfdde30953e266ae1eac4662ef6d4eec4e0ab3b4f8a264b3f4e70324f439372ad6648cc5f3ced312be8329de31652cc474c98c6ec1cb6e095b848
|
7
|
+
data.tar.gz: 5568c6ce8e638d9a34cb0f6c450cb5cc3c2683b681af461eea416226467e8c5a32730a5ea568102620ea52a45f3bdf6c3f2097898130cd32e0753d02e1d97ab5
|
data/README.md
CHANGED
@@ -3,12 +3,12 @@
|
|
3
3
|
[![Issue Count](https://codeclimate.com/github/PHCNetworks/phc-press/badges/issue_count.svg)](https://codeclimate.com/github/PHCNetworks/phc-press)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/phcpress.svg)](https://badge.fury.io/rb/phcpress)
|
5
5
|
|
6
|
-
###
|
7
|
-
|
6
|
+
### PHCPress(2) (Blog & News Post Engine) Documentation
|
7
|
+
PHCPress is an open source news & blog engine built for PHCPress application
|
8
8
|
|
9
9
|
#### Step 1 - Add PHCPress to your gemfile
|
10
10
|
|
11
|
-
gem 'phcpress', '~> 2.
|
11
|
+
gem 'phcpress', '~> 2.7', '>= 2.7.5'
|
12
12
|
bundle exec install
|
13
13
|
|
14
14
|
#### Step 2 - Add PHCPress database migration files
|
@@ -21,7 +21,7 @@ module Phcpress
|
|
21
21
|
|
22
22
|
# Create a New News Post (/news/posts/new)
|
23
23
|
def new
|
24
|
-
@news_post = News::Post.
|
24
|
+
@news_post = current_user.News::Post.new
|
25
25
|
end
|
26
26
|
|
27
27
|
# Edit News Post /news/posts/1/edit
|
@@ -30,7 +30,7 @@ module Phcpress
|
|
30
30
|
|
31
31
|
# POST
|
32
32
|
def create
|
33
|
-
@news_post = News::Post.
|
33
|
+
@news_post = current_user.News::Post.(news_post_params)
|
34
34
|
|
35
35
|
if @news_post.save
|
36
36
|
redirect_to news_posts_path, notice: 'News post was successfully created.'
|
@@ -1,10 +1,8 @@
|
|
1
1
|
module Phcpress
|
2
2
|
class Blog::Post < ActiveRecord::Base
|
3
3
|
|
4
|
-
#
|
5
|
-
|
6
|
-
where(:user_id => current_user.id)
|
7
|
-
end
|
4
|
+
# Filters Before Post
|
5
|
+
before_create :authour
|
8
6
|
|
9
7
|
# For Image Uploads
|
10
8
|
mount_uploader :pstimage, Phcpress::PstimageUploader
|
@@ -12,5 +10,10 @@ module Phcpress
|
|
12
10
|
# Associate Post Authour to User
|
13
11
|
belongs_to :user
|
14
12
|
|
13
|
+
# Define r Devise
|
14
|
+
def authour
|
15
|
+
self.user_id = current_user.id
|
16
|
+
end
|
17
|
+
|
15
18
|
end
|
16
19
|
end
|
@@ -1,16 +1,19 @@
|
|
1
1
|
module Phcpress
|
2
2
|
class News::Post < ActiveRecord::Base
|
3
3
|
|
4
|
-
#
|
5
|
-
|
6
|
-
where(:user_id => current_user.id)
|
7
|
-
end
|
4
|
+
# Filters Before Post
|
5
|
+
before_create :authour
|
8
6
|
|
9
7
|
# For Image Uploads
|
10
8
|
mount_uploader :pstimage, Phcpress::PstimageUploader
|
11
9
|
|
12
10
|
# Associate Post Authour to User
|
13
11
|
belongs_to :user
|
12
|
+
|
13
|
+
# Define r Devise
|
14
|
+
def authour
|
15
|
+
self.user_id = current_user.id
|
16
|
+
end
|
14
17
|
|
15
18
|
end
|
16
19
|
end
|
data/lib/phcpress/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcpress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BradPotts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -290,8 +290,7 @@ dependencies:
|
|
290
290
|
- - "~>"
|
291
291
|
- !ruby/object:Gem::Version
|
292
292
|
version: 0.5.0
|
293
|
-
description:
|
294
|
-
for PHCPress application.
|
293
|
+
description: PHCPress is an open source news & blog engine built for PHCPress application
|
295
294
|
email:
|
296
295
|
- info@phcnetworks.net
|
297
296
|
executables: []
|
@@ -360,5 +359,5 @@ rubyforge_project:
|
|
360
359
|
rubygems_version: 2.5.1
|
361
360
|
signing_key:
|
362
361
|
specification_version: 4
|
363
|
-
summary: News & Blog Posts
|
362
|
+
summary: News & Blog Posts Engin
|
364
363
|
test_files: []
|