foreman_datacenter 0.1.24 → 0.1.25

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
  SHA1:
3
- metadata.gz: 830571f1589958041b0aaa9dec1bf8304b5c841c
4
- data.tar.gz: 0bd0a890f73397ccbb390f15843fdf6b5bbd50ad
3
+ metadata.gz: 8878c163868b06de88d2f8784362324e50426593
4
+ data.tar.gz: 1922796a6ce8f92a4067c183befd9fadbfecdb45
5
5
  SHA512:
6
- metadata.gz: 6ebe444b3ad488c5f06ec03ee38fc51d90433f2522beeff517f8c3922bd4fdfd6c9616b894601130a9fce24f309913d4d9bf3323a377643932f711111ed5ac97
7
- data.tar.gz: 52471ce0703b8f63641380dacb524d8a3e5e1f9c09f34d1272cbcae2eb43f52e1a01b5cb8fee4ef567b2581ff5be2fe82ef956e708d74a8ee876b224b9552f3a
6
+ metadata.gz: 915ed6c1800e9f1458be6c4ba7a650130511ec7d6606129a894a16d47062ffcc6ad1c4a437e4323ec05298125bd28ef62e607851a29185b248800af5d93de92a
7
+ data.tar.gz: 45be7d98c011b07471e6d27fe3843a3efe5871876719250fda1aa7383878e94490059a981b5221c9139eeaec5a4739520cea41feedb39d1c867accd0a37e4360
@@ -2,5 +2,7 @@ module ForemanDatacenter
2
2
  class Comment < ActiveRecord::Base
3
3
  self.table_name = "datacenter_comments"
4
4
  belongs_to :commentable, polymorphic: true
5
+ belongs_to :parent, class_name: "ForemanDatacenter::Comment"
6
+ has_many :children, class_name: "ForemanDatacenter::Comment", foreign_key: "parent_id"
5
7
  end
6
8
  end
@@ -285,13 +285,6 @@
285
285
  </table>
286
286
  </div>
287
287
 
288
- <!-- Comments -->
289
- <div class="panel panel-default">
290
- <div class="panel-heading">
291
- <strong>Comments</strong>
292
- </div>
293
- <div class="panel-body"><%= simple_format @device.comments %></div>
294
- </div>
295
288
  </div>
296
289
  </div>
297
290
 
@@ -0,0 +1,5 @@
1
+ class AddParentIdToComments < ActiveRecord::Migration
2
+ def change
3
+ add_reference :comments, :parent, index: true
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module ForemanDatacenter
2
- VERSION = '0.1.24'.freeze
2
+ VERSION = '0.1.25'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_datacenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.24
4
+ version: 0.1.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Ivanov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-26 00:00:00.000000000 Z
11
+ date: 2017-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -324,6 +324,7 @@ files:
324
324
  - db/migrate/20170922110137_create_comments.rb
325
325
  - db/migrate/20170922174725_renaming_comments.rb
326
326
  - db/migrate/20170924194247_rename_device_comments_column.rb
327
+ - db/migrate/20170929072115_add_parent_id_to_comments.rb
327
328
  - lib/foreman_datacenter.rb
328
329
  - lib/foreman_datacenter/engine.rb
329
330
  - lib/foreman_datacenter/version.rb