phcpresspro 4.1.6 → 4.1.8
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/articles/posts_controller.rb +1 -1
- data/app/models/phcpresspro/articles/post.rb +2 -2
- data/app/models/phcpresspro/modules/category.rb +2 -2
- data/app/models/phcpresspro/modules/connection.rb +2 -2
- data/app/views/phcpresspro/articles/posts/_form.html.erb +1 -1
- data/config/routes.rb +3 -3
- data/lib/phcpresspro/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e5518a5c76e2630c189fef3248652c27a71a037
|
4
|
+
data.tar.gz: 68c6a49de440bb25da939e3f5ac2faf4b8f4c79d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f0cc17cc48b0f50b2a3caa6f60443fde64c27c1319b803c4acf15982e069698782f557002fa4a53f64d08c91b4ad424725b134129b58d3ec81278d2172b7bd7
|
7
|
+
data.tar.gz: f439c3956eeef510834e57ba39c4a64a7fd23a3646be9f28c4c8f25f7dcc3d528fe7ec16d82f104295fd4900d37e8aacc4243b7808ea508ee4688320457b401c
|
@@ -61,7 +61,7 @@ module Phcpresspro
|
|
61
61
|
|
62
62
|
# Whitelists
|
63
63
|
def articles_post_params
|
64
|
-
params.require(:articles_post).permit(:psttitle, :psttext, :pstexcerpts, :pststatus, :pstcategory, :pstimage, :remove_pstimage, :
|
64
|
+
params.require(:articles_post).permit(:psttitle, :psttext, :pstexcerpts, :pststatus, :pstcategory, :pstimage, :remove_pstimage, :user_id, :membership_id, :oganization_id)
|
65
65
|
end
|
66
66
|
|
67
67
|
end
|
@@ -5,8 +5,8 @@ module Phcpresspro
|
|
5
5
|
mount_uploader :pstimage, Phcpresspro::PstimageUploader
|
6
6
|
|
7
7
|
# Relationships
|
8
|
-
has_many :connections, class_name: '
|
9
|
-
has_many :categories, class_name: '
|
8
|
+
has_many :connections, class_name: 'Modules::Connection'
|
9
|
+
has_many :categories, class_name: 'Modules::Category', :through => :connections
|
10
10
|
|
11
11
|
end
|
12
12
|
end
|
@@ -2,8 +2,8 @@ module Phcpresspro
|
|
2
2
|
class Modules::Category < ApplicationRecord
|
3
3
|
|
4
4
|
# Relationships
|
5
|
-
has_many :connections, class_name: '
|
6
|
-
has_many :posts, class_name: '
|
5
|
+
has_many :connections, class_name: 'Modules::Connection'
|
6
|
+
has_many :posts, class_name: 'Modules::Category', :through => :connections
|
7
7
|
|
8
8
|
end
|
9
9
|
end
|
@@ -2,8 +2,8 @@ module Phcpresspro
|
|
2
2
|
class Modules::Connection < ApplicationRecord
|
3
3
|
|
4
4
|
# Relationships
|
5
|
-
belongs_to :post, class_name: '
|
6
|
-
belongs_to :category, class_name: '
|
5
|
+
belongs_to :post, class_name: 'Articles::Post'
|
6
|
+
belongs_to :category, class_name: 'Modules::Category'
|
7
7
|
|
8
8
|
end
|
9
9
|
end
|
@@ -44,7 +44,7 @@
|
|
44
44
|
</div>
|
45
45
|
<div class="panel-body">
|
46
46
|
<div class="form-group">
|
47
|
-
<%= f.collection_check_boxes :category_ids,
|
47
|
+
<%= f.collection_check_boxes :category_ids, Modules::Category.all, :id, :catname do |post_category| %>
|
48
48
|
<%= post_category.check_box %>
|
49
49
|
<%= post_category.label %></br>
|
50
50
|
<% end %>
|
data/config/routes.rb
CHANGED
@@ -2,13 +2,13 @@ Phcpresspro::Engine.routes.draw do
|
|
2
2
|
|
3
3
|
# Article Routes
|
4
4
|
namespace :articles do
|
5
|
-
resources :posts, class_name: '
|
5
|
+
resources :posts, class_name: 'Articles::Post'
|
6
6
|
end
|
7
7
|
|
8
8
|
# Module Routes
|
9
9
|
namespace :modules do
|
10
|
-
resources :connections, class_name: '
|
11
|
-
resources :categories, class_name: '
|
10
|
+
resources :connections, class_name: 'Modules::Connection'
|
11
|
+
resources :categories, class_name: 'Modules::Category'
|
12
12
|
end
|
13
13
|
|
14
14
|
end
|
data/lib/phcpresspro/version.rb
CHANGED