phcdevworks_press 2.0.1 → 3.0.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/phcdevworks_press/article/categories_controller.rb +1 -1
- data/app/controllers/phcdevworks_press/article/posts_controller.rb +1 -1
- data/app/models/phcdevworks_press/article/category.rb +3 -3
- data/app/models/phcdevworks_press/article/post.rb +4 -4
- data/app/models/phcdevworks_press/article.rb +1 -1
- data/app/models/phcdevworks_press/{category_versions.rb → article_category_versions.rb} +1 -1
- data/app/models/phcdevworks_press/{post_versions.rb → article_post_versions.rb} +1 -1
- data/db/migrate/20170517064030_create_phcdevworks_press_post_versions.rb +1 -1
- data/db/migrate/20170517064427_create_phcdevworks_press_category_versions.rb +1 -1
- data/lib/phcdevworks_press/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6732948be8e5bb9338fd051091cfbfb79f7289ff07f6eecff6d0a98df2565ad5
|
4
|
+
data.tar.gz: fd5e34633a15db12008636d1f0b9013f62f67c7b80521e022ca2578f9f88be18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 159bd8ebdbce69877007bd716fe415b521efb4c94c865865c85fb7000c0125ea0b8040fd96d1891d5d408fd5726d383723de8b0beeec1a873ccfcbb26d3a0c1f
|
7
|
+
data.tar.gz: 005dccf48bfdcb277c844b3353719cd1ceddbc08add06620b7c081ff984e1ceb979448db4e86aaa0644ae66f03f9732956ef9f0a1d4c7292161fcffc006b035d
|
@@ -17,7 +17,7 @@ module PhcdevworksPress
|
|
17
17
|
# GET /article/categories/1
|
18
18
|
def show
|
19
19
|
@article_category = Article::Category.friendly.find(params[:id])
|
20
|
-
@versions = PhcdevworksPress::
|
20
|
+
@versions = PhcdevworksPress::ArticleCategoryVersions.where(item_id: params[:id], item_type: 'PhcdevworksPress::Article::Category')
|
21
21
|
end
|
22
22
|
|
23
23
|
# GET /article/categories/new
|
@@ -17,7 +17,7 @@ module PhcdevworksPress
|
|
17
17
|
# GET /article/posts/1
|
18
18
|
def show
|
19
19
|
@article_post = Article::Post.friendly.find(params[:id])
|
20
|
-
@versions = PhcdevworksPress::
|
20
|
+
@versions = PhcdevworksPress::ArticlePostVersions.where(item_id: params[:id], item_type: 'PhcdevworksPress::Article::Post')
|
21
21
|
end
|
22
22
|
|
23
23
|
# GET /article/posts/new
|
@@ -5,11 +5,11 @@ module PhcdevworksPress
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Paper Trail Initialize
|
8
|
-
has_paper_trail :class_name =>
|
8
|
+
has_paper_trail :class_name => "PhcdevworksPress::ArticleCategoryVersions"
|
9
9
|
|
10
10
|
# Relationships
|
11
|
-
has_and_belongs_to_many :posts, class_name:
|
12
|
-
belongs_to :user, class_name:
|
11
|
+
has_and_belongs_to_many :posts, class_name: "Article::Post", :join_table => "phcdevworks_press_categories_posts", :dependent => :destroy
|
12
|
+
belongs_to :user, class_name: "PhcdevworksAccounts::User"
|
13
13
|
|
14
14
|
# Form Fields Validation
|
15
15
|
validates :category_name,
|
@@ -5,14 +5,14 @@ module PhcdevworksPress
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Paper Trail Initialize
|
8
|
-
has_paper_trail :class_name =>
|
8
|
+
has_paper_trail :class_name => "PhcdevworksPress::ArticlePostVersions"
|
9
9
|
|
10
10
|
# Image Upload
|
11
11
|
has_one_attached :post_image
|
12
12
|
|
13
13
|
# Relationships
|
14
|
-
has_and_belongs_to_many :categories, class_name:
|
15
|
-
belongs_to :user, class_name:
|
14
|
+
has_and_belongs_to_many :categories, class_name: "Article::Category", :join_table => "phcdevworks_press_categories_posts"
|
15
|
+
belongs_to :user, class_name: "PhcdevworksAccounts::User"
|
16
16
|
|
17
17
|
# Form Fields Validation
|
18
18
|
validates :post_title,
|
@@ -25,7 +25,7 @@ module PhcdevworksPress
|
|
25
25
|
friendly_id :phcdev_article_post_nice_urls, use: [:slugged, :finders]
|
26
26
|
|
27
27
|
def phcdev_article_post_nice_urls
|
28
|
-
[:
|
28
|
+
[:post_title]
|
29
29
|
end
|
30
30
|
|
31
31
|
end
|
@@ -11,7 +11,7 @@ class CreatePhcdevworksPressPostVersions < ActiveRecord::Migration[6.0]
|
|
11
11
|
t.datetime :created_at
|
12
12
|
end
|
13
13
|
|
14
|
-
add_index :phcdevworks_press_post_versions, %i(item_type item_id), :name => '
|
14
|
+
add_index :phcdevworks_press_post_versions, %i(item_type item_id), :name => 'article_post_versions'
|
15
15
|
|
16
16
|
end
|
17
17
|
end
|
@@ -11,7 +11,7 @@ class CreatePhcdevworksPressCategoryVersions < ActiveRecord::Migration[6.0]
|
|
11
11
|
t.datetime :created_at
|
12
12
|
end
|
13
13
|
|
14
|
-
add_index :phcdevworks_press_category_versions, %i(item_type item_id), :name => '
|
14
|
+
add_index :phcdevworks_press_category_versions, %i(item_type item_id), :name => 'article_category_versions'
|
15
15
|
|
16
16
|
end
|
17
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcdevworks_press
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHCDevworks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -274,8 +274,8 @@ files:
|
|
274
274
|
- app/models/phcdevworks_press/article.rb
|
275
275
|
- app/models/phcdevworks_press/article/category.rb
|
276
276
|
- app/models/phcdevworks_press/article/post.rb
|
277
|
-
- app/models/phcdevworks_press/
|
278
|
-
- app/models/phcdevworks_press/
|
277
|
+
- app/models/phcdevworks_press/article_category_versions.rb
|
278
|
+
- app/models/phcdevworks_press/article_post_versions.rb
|
279
279
|
- app/views/layouts/phcdevworks_press/application.html.erb
|
280
280
|
- app/views/layouts/phcdevworks_press/components/backend/footer/_footer.html.erb
|
281
281
|
- app/views/layouts/phcdevworks_press/components/backend/navigation/_top_menu.html.erb
|