simple_nested_set 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -102,8 +102,8 @@ module SimpleNestedSet
102
102
  update_all(sql.join(',')) unless sql.blank?
103
103
 
104
104
  if [:mysql, :mysql2].include?(db_adapter)
105
- update_all("`level` = 0", "`level` IS NULL")
106
- update_all("`path` = `slug`", "`path` IS NULL")
105
+ update_all("`level` = 0", "`level` IS NULL") if node.has_attribute?(:level)
106
+ update_all("`path` = `slug`", "`path` IS NULL") if node.has_attribute?(:slug) && node.has_attribute?(:path)
107
107
  end
108
108
  end
109
109
 
@@ -1,3 +1,3 @@
1
1
  module SimpleNestedSet
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_nested_set
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sven Fuchs
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-03-09 00:00:00 +01:00
19
+ date: 2011-03-29 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency