phcdevworks_tutorials 6.6.2 → 6.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/phcdevworks_tutorials/command/post.rb +1 -1
- data/app/models/phcdevworks_tutorials/tutorial/category.rb +1 -0
- data/app/views/phcdevworks_tutorials/command/posts/_form.html.erb +10 -0
- data/db/migrate/20200328012248_phcdevworks_tutorials_categories_commands.rb +10 -0
- data/lib/phcdevworks_tutorials/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ac40b39c8277fb0084222bcd153c68f10820de8994ac1d53097e4be7b8eb778
|
4
|
+
data.tar.gz: 5c00536e27dde685c956f37950acb7fd6b36a9418c032ba8e2db731cb9d47a7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f753e0f75e161ecbdeb258b1c39fabcc8be7ed88115cabfc26b8c5203681b5e568615a435153ab84275873eb046108e42955eb8e3eeec329563a18935030185
|
7
|
+
data.tar.gz: f5f506a722c1918f3201eb44327f6333460427cc6f520169bb4037b922c37a07259718788c378adc31157f3ae580de9738b98545e75b7160ca775f4904b9c272
|
@@ -11,7 +11,7 @@ module PhcdevworksTutorials
|
|
11
11
|
has_one_attached :post_image
|
12
12
|
|
13
13
|
# Relationships
|
14
|
-
has_and_belongs_to_many :categories, class_name: "Tutorial::Category", :join_table => "
|
14
|
+
has_and_belongs_to_many :categories, class_name: "Tutorial::Category", :join_table => "phcdevworks_tutorials_categories_commands", :dependent => :destroy
|
15
15
|
has_many :items, class_name: "Command::Item"
|
16
16
|
belongs_to :user, class_name: "PhcdevworksAccounts::User"
|
17
17
|
|
@@ -9,6 +9,7 @@ module PhcdevworksTutorials
|
|
9
9
|
|
10
10
|
#Relationships
|
11
11
|
has_and_belongs_to_many :posts, class_name: "Tutorial::Post", :join_table => "phcdevworks_tutorials_categories_posts", :dependent => :destroy
|
12
|
+
has_and_belongs_to_many :posts, class_name: "Command::Post", :join_table => "phcdevworks_tutorials_categories_commands", :dependent => :destroy
|
12
13
|
|
13
14
|
# Form Fields Validation
|
14
15
|
validates :category_name,
|
@@ -29,6 +29,16 @@
|
|
29
29
|
<% if form.object.post_image.attached? %>
|
30
30
|
<%= image_tag main_app.url_for(form.object.post_image), class: "img-responsive img-thumbnail" %>
|
31
31
|
<% end %>
|
32
|
+
|
33
|
+
<div class="form-group">
|
34
|
+
<label>Select a Category</label>
|
35
|
+
<div class="panel-body">
|
36
|
+
<%= form.collection_check_boxes :category_ids, PhcdevworksTutorials::Tutorial::Category.order(:category_name), :id, :category_name do |post_category| %>
|
37
|
+
<%= post_category.check_box %>
|
38
|
+
<%= post_category.label %><br>
|
39
|
+
<% end %>
|
40
|
+
</div>
|
41
|
+
</div>
|
32
42
|
<!-- Form Input Fields -->
|
33
43
|
|
34
44
|
<!-- Form Submition Button -->
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcdevworks_tutorials
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.6.
|
4
|
+
version: 6.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHCDevworks
|
@@ -358,6 +358,7 @@ files:
|
|
358
358
|
- db/migrate/20200320110553_create_phcdevworks_tutorials_command_items.rb
|
359
359
|
- db/migrate/20200321122525_create_phcdevworks_tutorials_command_items_versions.rb
|
360
360
|
- db/migrate/20200321122606_create_phcdevworks_tutorials_command_posts_versions.rb
|
361
|
+
- db/migrate/20200328012248_phcdevworks_tutorials_categories_commands.rb
|
361
362
|
- lib/phcdevworks_tutorials.rb
|
362
363
|
- lib/phcdevworks_tutorials/engine.rb
|
363
364
|
- lib/phcdevworks_tutorials/version.rb
|