phcdevworks_core_modules 6.2.0 → 6.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 442df7559719db291a049577b28a39b6b9e46f6736c2043c4c572c0b421e0aee
4
- data.tar.gz: f244e5a418d901de8f54b954a145d9443b440d6a65b6cc52f281e210dc47cdc9
3
+ metadata.gz: c6635c022554150178c187cf48a7f16ecda4b989b402941c403aa056207aea48
4
+ data.tar.gz: a6a28d94cf8459106d1e6a6b023a2efb14971478c7a5114c171038ed4f1cf02b
5
5
  SHA512:
6
- metadata.gz: 65128f0013f85a7ade5c3308c9cf718976341de95a9acb2ef68fe6dc3a8ef313ccb26269780eb4477c7afc39b1885bc8c0597da92254b2f0b21842ec4d538d38
7
- data.tar.gz: 2fa7caeb4e059030191f4efcfbb817e498041e0ef8d988ab9ac7fab2a6590f865d13bdb41ae9f6276e84dc7fe9660b88c7d51c1657cc7388a83cfc4a4bd7b644
6
+ metadata.gz: 5de7a0617699b18cf9fdd68a0901a20932dd755cdba0a3cee330da038d8ca2d8a16e240dd6e51f798e270dd7f128643809e93f9657de237572bb7145e6fa1ee5
7
+ data.tar.gz: b5fe93be8810ac04b4b43ecfb02364a241a55f63940b6c09e4d926a3d043f168cec13e28caed34e7178a33dab295be1168831ca112383a824513834d139ba3a3
@@ -1,13 +1,13 @@
1
1
  module PhcdevworksCoreModules
2
- class ApplicationController < ActionController::Base
2
+ class ApplicationController < ActionController::Base
3
3
 
4
- # Security Filters
5
- protect_from_forgery with: :exception
4
+ # Security Filters
5
+ protect_from_forgery with: :exception
6
6
 
7
- # Load Requried Helper Files
8
- helper PhcdevworksActiveMenus::Engine.helpers
9
- helper PhcdevworksNotifications::Engine.helpers
10
- helper PhcdevworksTitleseo::Engine.helpers
7
+ # Load Requried Helper Files
8
+ helper PhcdevworksActiveMenus::Engine.helpers
9
+ helper PhcdevworksNotifications::Engine.helpers
10
+ helper PhcdevworksTitleseo::Engine.helpers
11
11
 
12
- end
12
+ end
13
13
  end
@@ -1,81 +1,81 @@
1
1
  require_dependency "phcdevworks_core_modules/application_controller"
2
2
 
3
3
  module PhcdevworksCoreModules
4
- class Marketing::OptimizationsController < ApplicationController
4
+ class Marketing::OptimizationsController < ApplicationController
5
5
 
6
- # Filters & Security
7
- #include PhcdevworksCore::PhcpluginsHelper
8
- before_action :authenticate_user!
9
- before_action :set_paper_trail_whodunnit
10
- before_action :set_marketing_optimization, only: [:show, :edit, :update, :destroy]
6
+ # Filters & Security
7
+ #include PhcdevworksCore::PhcpluginsHelper
8
+ before_action :authenticate_user!
9
+ before_action :set_paper_trail_whodunnit
10
+ before_action :set_marketing_optimization, only: [:show, :edit, :update, :destroy]
11
11
 
12
- # GET /marketing/optimizations
13
- def index
14
- @marketing_optimizations = Marketing::Optimization.order('marketing_optimization_page_title ASC')
15
- end
12
+ # GET /marketing/optimizations
13
+ def index
14
+ @marketing_optimizations = Marketing::Optimization.order('marketing_optimization_page_title ASC')
15
+ end
16
16
 
17
- # GET /marketing/optimizations/1
18
- def show
19
- end
17
+ # GET /marketing/optimizations/1
18
+ def show
19
+ end
20
20
 
21
- # GET /marketing/optimizations/new
22
- def new
23
- @marketing_optimization = Marketing::Optimization.new
24
- end
21
+ # GET /marketing/optimizations/new
22
+ def new
23
+ @marketing_optimization = Marketing::Optimization.new
24
+ end
25
25
 
26
- # GET /marketing/optimizations/1/edit
27
- def edit
28
- end
26
+ # GET /marketing/optimizations/1/edit
27
+ def edit
28
+ end
29
29
 
30
- # POST /marketing/optimizations
31
- def create
32
- @marketing_optimization = Marketing::Optimization.new(marketing_optimization_params)
33
- @marketing_optimization.user_id = current_user.id
34
- @marketing_optimization.org_id = current_user.org_id
35
- respond_to do |format|
36
- if @marketing_optimization.save
37
- format.html { redirect_to marketing_optimizations_path, :flash => { :success => 'SEO Attributes has been Added.' }}
38
- format.json { render :show, status: :created, location: @marketing_optimization }
39
- else
40
- format.html { render :new }
41
- format.json { render json: @marketing_optimization.errors, status: :unprocessable_entity }
30
+ # POST /marketing/optimizations
31
+ def create
32
+ @marketing_optimization = Marketing::Optimization.new(marketing_optimization_params)
33
+ @marketing_optimization.user_id = current_user.id
34
+ @marketing_optimization.org_id = current_user.org_id
35
+ respond_to do |format|
36
+ if @marketing_optimization.save
37
+ format.html { redirect_to marketing_optimizations_path, :flash => { :success => 'SEO Attributes has been Added.' }}
38
+ format.json { render :show, status: :created, location: @marketing_optimization }
39
+ else
40
+ format.html { render :new }
41
+ format.json { render json: @marketing_optimization.errors, status: :unprocessable_entity }
42
+ end
43
+ end
42
44
  end
43
- end
44
- end
45
45
 
46
- # PATCH/PUT /marketing/optimizations/1
47
- def update
48
- respond_to do |format|
49
- if @marketing_optimization.update(marketing_optimization_params)
50
- format.html { redirect_to marketing_optimizations_path, :flash => { :notice => 'Tutorial has been Updated.' }}
51
- format.json { render :show, status: :ok, location: @marketing_optimization }
52
- else
53
- format.html { render :edit }
54
- format.json { render json: @marketing_optimization.errors, status: :unprocessable_entity }
46
+ # PATCH/PUT /marketing/optimizations/1
47
+ def update
48
+ respond_to do |format|
49
+ if @marketing_optimization.update(marketing_optimization_params)
50
+ format.html { redirect_to marketing_optimizations_path, :flash => { :notice => 'Tutorial has been Updated.' }}
51
+ format.json { render :show, status: :ok, location: @marketing_optimization }
52
+ else
53
+ format.html { render :edit }
54
+ format.json { render json: @marketing_optimization.errors, status: :unprocessable_entity }
55
+ end
56
+ end
55
57
  end
56
- end
57
- end
58
58
 
59
- # DELETE /marketing/optimizations/1
60
- def destroy
61
- @marketing_optimization.destroy
62
- respond_to do |format|
63
- format.html { redirect_to marketing_optimizations_path, :flash => { :error => 'SEO Attributes and Post Connections have all been Removed.' }}
64
- format.json { head :no_content }
65
- end
66
- end
59
+ # DELETE /marketing/optimizations/1
60
+ def destroy
61
+ @marketing_optimization.destroy
62
+ respond_to do |format|
63
+ format.html { redirect_to marketing_optimizations_path, :flash => { :error => 'SEO Attributes and Post Connections have all been Removed.' }}
64
+ format.json { head :no_content }
65
+ end
66
+ end
67
67
 
68
- private
68
+ private
69
69
 
70
- # Common Callbacks
71
- def set_marketing_optimization
72
- @marketing_optimization = Marketing::Optimization.find(params[:id])
73
- end
70
+ # Common Callbacks
71
+ def set_marketing_optimization
72
+ @marketing_optimization = Marketing::Optimization.find(params[:id])
73
+ end
74
74
 
75
- # Whitelist
76
- def marketing_optimization_params
77
- params.require(:marketing_optimization).permit(:marketing_optimization_page_title, :marketing_optimization_page_description, :marketing_optimization_og_title, :marketing_optimization_og_description, :marketing_optimization_og_type, :marketing_optimization_og_url, :marketing_optimization_twitter_title, :marketing_optimization_twitter_description, :marketing_optimization_twitter_type, :marketing_optimization_twitter_url, :marketing_optimization_twitter_image, :marketing_optimization_og_image, :slug, :user_id, :org_id)
75
+ # Whitelist
76
+ def marketing_optimization_params
77
+ params.require(:marketing_optimization).permit(:marketing_optimization_page_title, :marketing_optimization_page_description, :marketing_optimization_og_title, :marketing_optimization_og_description, :marketing_optimization_og_type, :marketing_optimization_og_url, :marketing_optimization_twitter_title, :marketing_optimization_twitter_description, :marketing_optimization_twitter_type, :marketing_optimization_twitter_url, :marketing_optimization_twitter_image, :marketing_optimization_og_image, :slug, :user_id, :org_id)
78
+ end
79
+
78
80
  end
79
-
80
- end
81
81
  end
@@ -1,81 +1,81 @@
1
1
  require_dependency "phcdevworks_core_modules/application_controller"
2
2
 
3
3
  module PhcdevworksCoreModules
4
- class Post::CategoriesController < ApplicationController
5
-
6
- # Filters & Security
7
- #include PhcdevworksCore::PhcpluginsHelper
8
- before_action :authenticate_user!
9
- before_action :set_paper_trail_whodunnit
10
- before_action :set_post_category, only: [:show, :edit, :update, :destroy]
4
+ class Post::CategoriesController < ApplicationController
11
5
 
12
- # GET /post/categories
13
- def index
14
- @post_categories = Post::Category.order('post_category_name ASC')
15
- end
6
+ # Filters & Security
7
+ #include PhcdevworksCore::PhcpluginsHelper
8
+ before_action :authenticate_user!
9
+ before_action :set_paper_trail_whodunnit
10
+ before_action :set_post_category, only: [:show, :edit, :update, :destroy]
16
11
 
17
- # GET /post/categories/1
18
- def show
19
- end
12
+ # GET /post/categories
13
+ def index
14
+ @post_categories = Post::Category.order('post_category_name ASC')
15
+ end
20
16
 
21
- # GET /post/categories/new
22
- def new
23
- @post_category = Post::Category.new
24
- end
17
+ # GET /post/categories/1
18
+ def show
19
+ end
20
+
21
+ # GET /post/categories/new
22
+ def new
23
+ @post_category = Post::Category.new
24
+ end
25
25
 
26
- # GET /post/categories/1/edit
27
- def edit
28
- end
26
+ # GET /post/categories/1/edit
27
+ def edit
28
+ end
29
29
 
30
- # POST /post/categories
31
- def create
32
- @post_category = Post::Category.new(post_category_params)
33
- @post_category.user_id = current_user.id
34
- @post_category.org_id = current_user.org_id
35
- respond_to do |format|
36
- if @post_category.save
37
- format.html { redirect_to post_categories_path, :flash => { :success => 'Category has been Added.' }}
38
- format.json { render :show, status: :created, location: @post_category }
39
- else
40
- format.html { render :new }
41
- format.json { render json: @post_category.errors, status: :unprocessable_entity }
30
+ # POST /post/categories
31
+ def create
32
+ @post_category = Post::Category.new(post_category_params)
33
+ @post_category.user_id = current_user.id
34
+ @post_category.org_id = current_user.org_id
35
+ respond_to do |format|
36
+ if @post_category.save
37
+ format.html { redirect_to post_categories_path, :flash => { :success => 'Category has been Added.' }}
38
+ format.json { render :show, status: :created, location: @post_category }
39
+ else
40
+ format.html { render :new }
41
+ format.json { render json: @post_category.errors, status: :unprocessable_entity }
42
+ end
43
+ end
42
44
  end
43
- end
44
- end
45
45
 
46
- # PATCH/PUT /post/categories/1
47
- def update
48
- respond_to do |format|
49
- if @post_category.update(post_category_params)
50
- format.html { redirect_to post_categories_path, :flash => { :notice => 'Category has been Updated.' }}
51
- format.json { render :show, status: :ok, location: @post_category }
52
- else
53
- format.html { render :edit }
54
- format.json { render json: @post_category.errors, status: :unprocessable_entity }
46
+ # PATCH/PUT /post/categories/1
47
+ def update
48
+ respond_to do |format|
49
+ if @post_category.update(post_category_params)
50
+ format.html { redirect_to post_categories_path, :flash => { :notice => 'Category has been Updated.' }}
51
+ format.json { render :show, status: :ok, location: @post_category }
52
+ else
53
+ format.html { render :edit }
54
+ format.json { render json: @post_category.errors, status: :unprocessable_entity }
55
+ end
56
+ end
55
57
  end
56
- end
57
- end
58
58
 
59
- # DELETE /post/categories/1
60
- def destroy
61
- @post_category.destroy
62
- respond_to do |format|
63
- format.html { redirect_to post_categories_path, :flash => { :error => 'Categories and Category Connections have all been Removed.' }}
64
- format.json { head :no_content }
65
- end
66
- end
59
+ # DELETE /post/categories/1
60
+ def destroy
61
+ @post_category.destroy
62
+ respond_to do |format|
63
+ format.html { redirect_to post_categories_path, :flash => { :error => 'Categories and Category Connections have all been Removed.' }}
64
+ format.json { head :no_content }
65
+ end
66
+ end
67
67
 
68
- private
68
+ private
69
69
 
70
- # Common Callbacks
71
- def set_post_category
72
- @post_category = Post::Category.find(params[:id])
73
- end
70
+ # Common Callbacks
71
+ def set_post_category
72
+ @post_category = Post::Category.find(params[:id])
73
+ end
74
74
 
75
- # Whitelist
76
- def post_category_params
77
- params.require(:post_category).permit(:post_category_name, :slug, :optimization_id, :user_id, :org_id)
78
- end
75
+ # Whitelist
76
+ def post_category_params
77
+ params.require(:post_category).permit(:post_category_name, :slug, :user_id, :org_id)
78
+ end
79
79
 
80
- end
80
+ end
81
81
  end
@@ -1,7 +1,7 @@
1
1
  <!-- Form - Category -->
2
2
  <%= form_with(model: post_category, local: true) do |form| %>
3
3
 
4
- <!-- PHCNotifi Render Validation -->
4
+ <!-- PHCNotifi Render Validation -->
5
5
  <%= render "phcdevworks_notifications/bootstrap/validations", :object => @post_category %>
6
6
  <!-- PHCNotifi Render Validation -->
7
7
 
@@ -10,11 +10,6 @@
10
10
  <%= form.label :post_category_name, "Category Name" %>
11
11
  <%= form.text_field :post_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("marketing_optimization_page_title"), :id, :marketing_optimization_page_title, {}, {class: "form-control"}) %>
17
- </div>
18
13
  <!-- Form Input Fields -->
19
14
 
20
15
  <!-- Form Submition Button -->
@@ -0,0 +1,7 @@
1
+ class RemovePhcdevworksCoreModulesPostCategories < ActiveRecord::Migration[6.0]
2
+ def change
3
+
4
+ remove_column :phcdevworks_core_modules_post_categories, :optimization_id, :string
5
+
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksCoreModules
2
- VERSION = '6.2.0'
2
+ VERSION = '6.2.1'
3
3
  end
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: 6.2.0
4
+ version: 6.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHCDevworks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-02 00:00:00.000000000 Z
11
+ date: 2020-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -307,6 +307,7 @@ files:
307
307
  - db/migrate/20200705223718_create_phcdevworks_core_modules_marketing_optimizations.rb
308
308
  - db/migrate/20200705225433_create_phcdevworks_core_modules_marketing_optimization_versions.rb
309
309
  - db/migrate/20200706094820_create_phcdevworks_core_modules_post_categories.rb
310
+ - db/migrate/20201012225709_remove_phcdevworks_core_modules_post_categories.rb
310
311
  - lib/phcdevworks_core_modules.rb
311
312
  - lib/phcdevworks_core_modules/engine.rb
312
313
  - lib/phcdevworks_core_modules/version.rb