phcpresspro 70.0.0 → 70.1.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/phcpresspro/article/posts_controller.rb +0 -2
- data/app/models/phcpresspro/article/category.rb +2 -1
- data/app/models/phcpresspro/article/post.rb +1 -1
- data/db/migrate/{20190315173237_create_phcpresspro_join_table_categories_posts.rb → 20190315173237_create_join_table_categories_posts.rb} +1 -1
- data/lib/phcpresspro/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1167a233a14ffea6fc216b61d203b09800e8edd463b9da44a40dd6d9d5c05c5
|
4
|
+
data.tar.gz: 2fad5cc81aa8593e50e1ac50c7004eb8d67734bae2b2feb3b955b27f4b6f67e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73c37442c4129048959a9dd994c72ded0ffb1195c86dd300f9afb7f491dc8ecef79e2f50df1d991256537f63551834dd9befb5a6b45cf353cfa9142bee6f1eb1
|
7
|
+
data.tar.gz: 73cae04d7989901261b94b2556c17746a6d2e9902a7b5be94d37b3dea0849c00640aea66763412f3a91ecdc13e44931ba80ab52197702d005a6df4765b7e697a
|
@@ -36,7 +36,6 @@ module Phcpresspro
|
|
36
36
|
@article_post.user_id = current_user.id
|
37
37
|
@article_post.org_id = current_user.org_id
|
38
38
|
if @article_post.save
|
39
|
-
@article_post.connections.build
|
40
39
|
redirect_to article_posts_url, notice: 'Post was successfully created.'
|
41
40
|
else
|
42
41
|
render :new
|
@@ -48,7 +47,6 @@ module Phcpresspro
|
|
48
47
|
@article_post.user_id = current_user.id
|
49
48
|
@article_post.org_id = current_user.org_id
|
50
49
|
if @article_post.update(article_post_params)
|
51
|
-
@article_post.connections.build
|
52
50
|
redirect_to article_posts_url, notice: 'Post was successfully updated.'
|
53
51
|
else
|
54
52
|
render :edit
|
@@ -8,11 +8,12 @@ module Phcpresspro
|
|
8
8
|
has_paper_trail :class_name => 'Phcpresspro::CategoryVersions'
|
9
9
|
|
10
10
|
# Relationships
|
11
|
-
|
11
|
+
has_and_belongs_to_many :posts, class_name: 'Phcpresspro::Article::Post', :join_table => 'categories_posts'
|
12
12
|
|
13
13
|
# Validation for Form Fields
|
14
14
|
validates :catname,
|
15
15
|
presence: true,
|
16
|
+
uniqueness: true,
|
16
17
|
length: { minimum: 3 }
|
17
18
|
|
18
19
|
# Clean URL Define
|
@@ -11,7 +11,7 @@ module Phcpresspro
|
|
11
11
|
has_one_attached :pstimage
|
12
12
|
|
13
13
|
# Model Relationships
|
14
|
-
|
14
|
+
has_and_belongs_to_many :categories, class_name: 'Phcpresspro::Article::Category', :join_table => 'categories_posts'
|
15
15
|
|
16
16
|
# Validation for Form Fields
|
17
17
|
validates :psttittle,
|
data/lib/phcpresspro/version.rb
CHANGED
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: 70.
|
4
|
+
version: 70.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BradPotts
|
@@ -690,7 +690,7 @@ files:
|
|
690
690
|
- db/migrate/20170517064427_create_phcpresspro_category_versions.rb
|
691
691
|
- db/migrate/20190315010932_create_phcpresspro_article_posts.rb
|
692
692
|
- db/migrate/20190315040834_create_phcpresspro_article_categories.rb
|
693
|
-
- db/migrate/
|
693
|
+
- db/migrate/20190315173237_create_join_table_categories_posts.rb
|
694
694
|
- lib/phcpresspro.rb
|
695
695
|
- lib/phcpresspro/engine.rb
|
696
696
|
- lib/phcpresspro/version.rb
|