phcdevworks_core_modules 2.0.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/phcdevworks_core_modules/post/categories_controller.rb +1 -1
- data/app/models/phcdevworks_core_modules/marketing/optimization.rb +20 -5
- data/app/models/phcdevworks_core_modules/post/category.rb +14 -6
- data/app/views/phcdevworks_core_modules/post/categories/_form.html.erb +5 -0
- data/db/migrate/20200705223718_create_phcdevworks_core_modules_marketing_optimizations.rb +1 -0
- data/db/migrate/20200706094820_create_phcdevworks_core_modules_post_categories.rb +2 -0
- data/lib/phcdevworks_core_modules/version.rb +1 -1
- metadata +2 -3
- data/db/migrate/20200706091346_create_phcdevworks_core_modules_categories_optimizations.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26a1d4b42d4f3a48e06cbb7b2dcfdc8a175af44eef7822c3a60ff431e9bb897f
|
4
|
+
data.tar.gz: f80048ced8e87031b052ba6207baabbd583d8dc85e4b00c0877f02faf2aa8b0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee875e01eca345a2a0db7bcbf19bd2a122151fc57c092e004bc3750ff5bcc1a67689c29c0084c72a42bf48359a36182b798a6cffc94a19827a091ba8e00a1bee
|
7
|
+
data.tar.gz: 7665795363e0f55ba1f6d3250cfd330e393b71364cb2b5ddb6579d9aca9784e5b335e98e41d3248a8367ff8758ead188f51d0cdf236fc83b31baeaeba1ea48fd
|
@@ -74,7 +74,7 @@ module PhcdevworksCoreModules
|
|
74
74
|
|
75
75
|
# Whitelist
|
76
76
|
def post_category_params
|
77
|
-
params.require(:post_category).permit(:category_name, :slug, :user_id, :org_id)
|
77
|
+
params.require(:post_category).permit(:category_name, :slug, :optimization_id, :user_id, :org_id)
|
78
78
|
end
|
79
79
|
|
80
80
|
end
|
@@ -11,12 +11,27 @@ module PhcdevworksCoreModules
|
|
11
11
|
# Paper Trail Initialize
|
12
12
|
has_paper_trail :class_name => "PhcdevworksCoreModules::CoreOptimizationVersions"
|
13
13
|
|
14
|
-
# Relationships
|
14
|
+
# Relationships for Local
|
15
15
|
belongs_to :user, class_name: "PhcdevworksAccounts::User"
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
has_many :categories, class_name: "PhcdevworksCoreModules::Post::Category"
|
17
|
+
|
18
|
+
# Relationships for PHCDevworks Plugins
|
19
|
+
if defined?phcdevworks_members
|
20
|
+
has_many :listings, class_name: "PhcdevworksMembers::Member::Listing"
|
21
|
+
end
|
22
|
+
if defined?phcdevworks_scripts
|
23
|
+
has_many :listings, class_name: "PhcdevworksScripts::Script::Listing"
|
24
|
+
end
|
25
|
+
if defined?phcdevworks_press
|
26
|
+
has_many :posts, class_name: "PhcdevworksPress::Article::Post"
|
27
|
+
end
|
28
|
+
if defined?phcdevworks_portfolio
|
29
|
+
has_many :posts, class_name: "PhcdevworksPortfolio::Project::Post"
|
30
|
+
end
|
31
|
+
if defined?phcdevworks_tutorials
|
32
|
+
has_many :posts, class_name: "PhcdevworksTutorials::Tutorial::Post"
|
33
|
+
has_many :posts, class_name: "PhcdevworksTutorials::Command::Post"
|
34
|
+
end
|
20
35
|
|
21
36
|
# Form Fields Validation
|
22
37
|
validates :seo_title,
|
@@ -11,13 +11,21 @@ module PhcdevworksCoreModules
|
|
11
11
|
# Paper Trail Initialize
|
12
12
|
has_paper_trail :class_name => "PhcdevworksCoreModules::CoreCategoryVersions"
|
13
13
|
|
14
|
-
# Relationships
|
14
|
+
# Relationships for Local
|
15
15
|
belongs_to :user, class_name: "PhcdevworksAccounts::User"
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
belongs_to :optimization, class_name: "PhcdevworksCoreModules::Marketing::Optimization", optional: true
|
17
|
+
|
18
|
+
# Relationships for PHCDevworks Plugins
|
19
|
+
if defined?phcdevworks_press
|
20
|
+
has_and_belongs_to_many :posts, class_name: "PhcdevworksPress::Article::Post", :join_table => "phcdevworks_press_categories_posts", :dependent => :destroy
|
21
|
+
end
|
22
|
+
if defined?phcdevworks_portfolio
|
23
|
+
has_and_belongs_to_many :posts, class_name: "PhcdevworksPortfolio::Project::Post", :join_table => "phcdevworks_portfolio_categories_posts", :dependent => :destroy
|
24
|
+
end
|
25
|
+
if defined?phcdevworks_tutorials
|
26
|
+
has_and_belongs_to_many :posts, class_name: "PhcdevworksTutorials::Tutorial::Post", :join_table => "phcdevworks_tutorials_categories_posts", :dependent => :destroy
|
27
|
+
has_and_belongs_to_many :posts, class_name: "PhcdevworksTutorials::Command::Post", :join_table => "phcdevworks_tutorials_categories_commands", :dependent => :destroy
|
28
|
+
end
|
21
29
|
|
22
30
|
# Form Fields Validation
|
23
31
|
validates :category_name,
|
@@ -10,6 +10,11 @@
|
|
10
10
|
<%= form.label :category_name, "Category Name" %>
|
11
11
|
<%= form.text_field :category_name, class: "form-control" %>
|
12
12
|
</div>
|
13
|
+
|
14
|
+
<div class="form-group">
|
15
|
+
<label>Attach SEO Data</label>
|
16
|
+
<%= collection_select(:post_category, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("seo_title"), :id, :seo_title, {}, {class: "form-control"}) %>
|
17
|
+
</div>
|
13
18
|
<!-- Form Input Fields -->
|
14
19
|
|
15
20
|
<!-- Form Submition Button -->
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcdevworks_core_modules
|
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: 2020-07-
|
11
|
+
date: 2020-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -306,7 +306,6 @@ files:
|
|
306
306
|
- db/migrate/20170517064427_create_phcdevworks_core_modules_category_versions.rb
|
307
307
|
- db/migrate/20200705223718_create_phcdevworks_core_modules_marketing_optimizations.rb
|
308
308
|
- db/migrate/20200705225433_create_phcdevworks_core_modules_optimization_versions.rb
|
309
|
-
- db/migrate/20200706091346_create_phcdevworks_core_modules_categories_optimizations.rb
|
310
309
|
- db/migrate/20200706094820_create_phcdevworks_core_modules_post_categories.rb
|
311
310
|
- lib/phcdevworks_core_modules.rb
|
312
311
|
- lib/phcdevworks_core_modules/engine.rb
|