the_comments 2.2.1 → 2.2.2

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
  SHA1:
3
- metadata.gz: c9b40a513dfcde29584a219ae81ffe2b27871aef
4
- data.tar.gz: ebaeb4e1c60951c24fafb588b57a37bced1f7dcb
3
+ metadata.gz: 49fd19e10fb5ca5adbbb061aced7c0c844b85bac
4
+ data.tar.gz: 36c6ab87c989e3bb71f108f382537084bf6aa78e
5
5
  SHA512:
6
- metadata.gz: 1d0b0a2a09b80585763e52ff47741bf2310bc286c2c99268e943dcc77f26b7590c3dabeb3f7275b6ce790302298913e7b576f76a7340401c3ff06d8c8f7852f5
7
- data.tar.gz: 865e014386a9a7d39227dcf6471ed96dfd785b4d9353419bc4f9bd6a9fe52bf1d54e4e7e79d8caaddf47d7fd33a42324e26f918e814882f747fce3b77a3ff29e
6
+ metadata.gz: 1ea2f9f5bf511f4350efc70c0a53a65c4db5cdeb0fcbe98e09d33afc6c9c57d5ab88a766b7e0e6db4ec1c21f9db209af10b9546285b0c414fe85f4920e56fea1
7
+ data.tar.gz: 096802337316119520c1811ecc7e463adb9f684deab5f97a7a4ba64d3c0137a53def4d110f292d65be7c237d5bd7eed4edc079bf03f86093244f8f865a12a6b4
data/README.md CHANGED
@@ -34,7 +34,7 @@ Please before ask anything try to launch and play with **[Dummy App](spec/dummy_
34
34
  **Gemfile**
35
35
 
36
36
  ```ruby
37
- gem "the_comments", "~> 2.1.0"
37
+ gem "the_comments", "~> 2.2.1"
38
38
 
39
39
  gem 'haml' # or gem 'slim'
40
40
  gem 'awesome_nested_set' # or same gem
@@ -140,6 +140,8 @@
140
140
  }
141
141
 
142
142
  .controls{
143
+ position: absolute;
144
+ top: 53px; left: 5px;
143
145
  a{
144
146
  font-size:11px;
145
147
  display:block;
@@ -47,8 +47,14 @@ module TheComments
47
47
 
48
48
  # to deleted (cascade like query)
49
49
  after_transition [:draft, :published] => :deleted do |comment|
50
- ids = comment.self_and_descendants.map(&:id)
51
- ::Comment.where(id: ids).update_all(state: :deleted)
50
+
51
+ if TheComments.config.delete_descendants_on_node_delete
52
+ ids = comment.self_and_descendants.map(&:id)
53
+ ::Comment.where(id: ids).update_all(state: :deleted)
54
+ else
55
+ id = comment.id
56
+ ::Comment.where(id: id).update_all(state: :deleted)
57
+ end
52
58
 
53
59
  @owner.try :recalculate_my_comments_counter!
54
60
  @holder.try :recalculate_comcoms_counters!
@@ -11,4 +11,5 @@ TheComments.configure do |config|
11
11
 
12
12
  config.empty_trap_protection = true
13
13
  config.tolerance_time_protection = true
14
+ config.delete_descendants_on_node_delete = true
14
15
  end
data/gem_version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module TheComments
2
- VERSION = "2.2.1"
2
+ VERSION = "2.2.2"
3
3
  end
@@ -19,7 +19,8 @@ module TheComments
19
19
  :default_title,
20
20
  :template_engine,
21
21
  :empty_trap_protection,
22
- :tolerance_time_protection
22
+ :tolerance_time_protection,
23
+ :delete_descendants_on_node_delete
23
24
  end
24
25
 
25
26
  configure do |config|
@@ -33,5 +34,7 @@ module TheComments
33
34
 
34
35
  config.empty_trap_protection = true
35
36
  config.tolerance_time_protection = true
37
+
38
+ config.delete_descendants_on_node_delete = true
36
39
  end
37
40
  end
@@ -2,7 +2,7 @@ windows:
2
2
  - name: "TheComments"
3
3
  root: "~/rails/opensource/the_comments"
4
4
  filters:
5
- before: "rvm use ruby-2.0.0-p353; rvm gemset use the_comments"
5
+ before: "rvm use ruby-2.0.0-p353; rvm gemset use the_comments --create"
6
6
  layout: tiled
7
7
  panes:
8
8
  - cmd: "clear;"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: the_comments
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya N. Zykin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-21 00:00:00.000000000 Z
11
+ date: 2014-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: state_machine