phcpresspro 4.0.4 → 4.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/phcpresspro/articles/post.rb +3 -1
- data/app/models/phcpresspro/modules/category.rb +2 -1
- data/app/models/phcpresspro/modules/connection.rb +4 -0
- data/app/views/phcpresspro/articles/posts/_form.html.erb +4 -2
- data/db/migrate/20160718204718_create_phcpresspro_articles_posts.rb +0 -2
- data/db/migrate/20160719194145_create_phcpresspro_modules_connections.rb +15 -0
- data/lib/phcpresspro/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2502868a47ca5fa52e7c060d59789d30a20019db
|
4
|
+
data.tar.gz: e15f698cb7ee695a4282050019a25f04dc41096b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4a2d5bc5a837211226a89c0b877a57169c1a665d155a696542b9dae8ac9f06c75b400586ef0c70a35f62ac43ebbdecfa77db09f81f066618cdfa75dc84cde09
|
7
|
+
data.tar.gz: 53d87d9986e85a683ee300193833b928841a0f17c2a0330f6f0864cd791069a17d53cede2c4d23523654f271685f955a458df06c6df12cd016647f7b00497ceb
|
@@ -5,7 +5,9 @@ module Phcpresspro
|
|
5
5
|
mount_uploader :pstimage, Phcpresspro::PstimageUploader
|
6
6
|
|
7
7
|
# Relationships
|
8
|
-
|
8
|
+
# Relationships
|
9
|
+
has_many :connections
|
10
|
+
has_many :categories, :through => :connections, class_name: 'Modules::Category'
|
9
11
|
|
10
12
|
end
|
11
13
|
end
|
@@ -16,8 +16,10 @@
|
|
16
16
|
<%= f.select( :pststatus, [['Draft','draft'],['Publish','publish'],['Review','review']], {}, {class: "form-control form-control-sm"}) %>
|
17
17
|
</div>
|
18
18
|
<div class="form-group">
|
19
|
-
<%= f.
|
20
|
-
|
19
|
+
<%= f.fields_for :connection do |modules_connection| %>
|
20
|
+
<%= modules_connection.label :category_id, "Post Category" %>
|
21
|
+
<%= collection_select(:category_id, :category_id, Phcpresspro::Modules::Category.order('catname'), :id, :catname, {}, {class: "form-control form-control"}) %>
|
22
|
+
<% end %>
|
21
23
|
</div>
|
22
24
|
<div class="actions">
|
23
25
|
<%= f.submit "Publish", class: "btn btn-primary btn-sm" %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreatePhcpressproModulesConnections < ActiveRecord::Migration[5.0]
|
2
|
+
def change
|
3
|
+
create_table :phcpresspro_modules_connections do |t|
|
4
|
+
|
5
|
+
# Article
|
6
|
+
t.references :post, index: true
|
7
|
+
|
8
|
+
# Modules
|
9
|
+
t.references :category, index: true
|
10
|
+
|
11
|
+
t.timestamps
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
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: 4.0.
|
4
|
+
version: 4.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BradPotts
|
@@ -547,6 +547,7 @@ files:
|
|
547
547
|
- app/models/phcpresspro/articles/post.rb
|
548
548
|
- app/models/phcpresspro/modules.rb
|
549
549
|
- app/models/phcpresspro/modules/category.rb
|
550
|
+
- app/models/phcpresspro/modules/connection.rb
|
550
551
|
- app/uploaders/phcpresspro/pstimage_uploader.rb
|
551
552
|
- app/views/layouts/phcpresspro/application.html.erb
|
552
553
|
- app/views/layouts/phcpresspro/backend/blog_layout.html.erb
|
@@ -563,6 +564,7 @@ files:
|
|
563
564
|
- config/routes.rb
|
564
565
|
- db/migrate/20160716182936_create_phcpresspro_modules_categories.rb
|
565
566
|
- db/migrate/20160718204718_create_phcpresspro_articles_posts.rb
|
567
|
+
- db/migrate/20160719194145_create_phcpresspro_modules_connections.rb
|
566
568
|
- lib/phcpresspro.rb
|
567
569
|
- lib/phcpresspro/engine.rb
|
568
570
|
- lib/phcpresspro/version.rb
|