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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1229c9b880195055adac7240f9063ab3343d0187a202d50e2bf8fd4a33e99745
4
- data.tar.gz: 60938e2ac51b08315f1e73edc3aaf130ebc87e45c7f9a356009834f845ac2bdc
3
+ metadata.gz: 1ac40b39c8277fb0084222bcd153c68f10820de8994ac1d53097e4be7b8eb778
4
+ data.tar.gz: 5c00536e27dde685c956f37950acb7fd6b36a9418c032ba8e2db731cb9d47a7a
5
5
  SHA512:
6
- metadata.gz: b43a9753f7fedf8ffc983a36ac02d2f084709d21efdaca2b2fd4bdd10622014d3a07bf007c7fc013a00091b0215c37cb838f70db9281600f4ee1ca7a0c47cd18
7
- data.tar.gz: 17371d9a056f583247fb3a9272cf6ebfb2452b63cb872b48a4e3e9348619d36672f8a75ca6560088b8752e4a5f5f7b19b0b7050ed163f3aa444c3d24391d0214
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 => "phcdevworks_tutorials_categories_posts", :dependent => :destroy
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 -->
@@ -0,0 +1,10 @@
1
+ class PhcdevworksTutorialsCategoriesCommands < ActiveRecord::Migration[6.0]
2
+ def change
3
+ create_table :phcdevworks_tutorials_categories_commands do |t|
4
+
5
+ t.integer :category_id
6
+ t.integer :post_id
7
+
8
+ end
9
+ end
10
+ end
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksTutorials
2
- VERSION = "6.6.2"
2
+ VERSION = "6.6.3"
3
3
  end
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.2
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