acts-as-tree-with-dotted-ids 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +9 -9
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87759d6b94e64e5e78f4c513083c64fa1cc0e673
4
- data.tar.gz: 735fcbcbb7b7d575b9a8a0c5e60a39eac0ed9530
3
+ metadata.gz: 61ccfbe031c422ef8dacaa2a7e3ad1fb49b77257
4
+ data.tar.gz: eedfcb4254147fb4049bf038d78d248e7368d4e6
5
5
  SHA512:
6
- metadata.gz: 209c4fd3d1640701cc988b1ea61ce0c42985f7aea6f551fd6a236d8e784918475e65dd803f4824cdea8760d3b05485017908f2bac89fefad8a8c0c40bdbf2215
7
- data.tar.gz: 64dd80ad140616a0fc443ab87b27e19d72e00a8a3265c6c5fb3511873ddb70f2e4762b8092006ff064f2a27b813cca739aa1473ad63d3e0ee0ea55a9a7915ba2
6
+ metadata.gz: ce6475476d459b7a69df7ca1fef351f9a1ed25965ce01cc4ed56a357c95dabd84f6936fcc8e98c9d8edffddf7617fe9cd13e2a1bd60b5e9db4282ef651d4718d
7
+ data.tar.gz: df842c79276203521ce3a4b085fadfb7fdc28ac715a57b18601b478cf6ab8491a6e2f5e7f6e547047d9854e5ff12880ba7472aced0154b63a2dc6e8a37dbd8bf
data/README.rdoc CHANGED
@@ -1,15 +1,15 @@
1
1
  = acts_as_tree_with_dotted_ids
2
2
 
3
- This is an extension to Rails good old acts_as_tree which uses an extra "dotted_ids" column
3
+ This is an extension to Rails good old acts_as_tree which uses an extra "dotted_ids" column
4
4
  which stores the path of the node as a string of record IDs joined by dots, hence the name.
5
5
 
6
- This optimization solves performance issues related to in-database tree structure by allowing
6
+ This optimization solves performance issues related to in-database tree structure by allowing
7
7
  for direct O(1) ancestor/child verification and O(N) subtree access with one single query.
8
8
 
9
9
  class Category < ActiveRecord::Base
10
10
  acts_as_tree_with_dotted_ids :order => "name"
11
11
  end
12
-
12
+
13
13
  Example:
14
14
 
15
15
  root
@@ -18,25 +18,25 @@ Example:
18
18
  \_ subchild2
19
19
 
20
20
  Usage:
21
-
21
+
22
22
  root = Category.create("name" => "root")
23
23
  child1 = root.children.create("name" => "child1")
24
24
  subchild1 = child1.children.create("name" => "subchild1")
25
-
25
+
26
26
  root.parent # => nil
27
27
  child1.parent # => root
28
28
  root.children # => [child1]
29
29
  root.children.first.children.first # => subchild1
30
30
  child1.ancestors_of?(subchild2) # => true
31
31
  subchild1.descendant_of?(root) # => true
32
-
32
+
33
33
  root.id # 1
34
34
  child1.id # 2
35
35
  subchild1.id # 3
36
36
  root.dotted_ids # "1"
37
37
  child1.dotted_ids # "1.2"
38
38
  subchild1.dotted_ids # "1.2.3"
39
-
39
+
40
40
  == Improvements
41
41
 
42
42
  The plugin adds the following instance methods:
@@ -65,7 +65,7 @@ If you already have an +acts_as_tree+ model, you can easily upgrade it to take a
65
65
 
66
66
  == Compatibility
67
67
 
68
- Tested with Rails 2.x and MySQL 5.x as well as SQLite.
68
+ From version 1.2.0, this gem is only compatible with Rails 4.x and up.
69
69
 
70
70
 
71
71
  == Thanks
@@ -75,4 +75,4 @@ Kudos to all the contributors to the original plugin.
75
75
 
76
76
  Copyright (c) 2007 David Heinemeier Hansson, released under the MIT license
77
77
 
78
- Copyright (c) 2008 Xavier Defrang, released under the MIT license
78
+ Copyright (c) 2008 Xavier Defrang, released under the MIT license
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts-as-tree-with-dotted-ids
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -45,20 +45,20 @@ dependencies:
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: 3.0.0
48
+ version: 4.0.0
49
49
  - - "~>"
50
50
  - !ruby/object:Gem::Version
51
- version: '3.0'
51
+ version: '4.0'
52
52
  type: :runtime
53
53
  prerelease: false
54
54
  version_requirements: !ruby/object:Gem::Requirement
55
55
  requirements:
56
56
  - - ">="
57
57
  - !ruby/object:Gem::Version
58
- version: 3.0.0
58
+ version: 4.0.0
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.0'
61
+ version: '4.0'
62
62
  description: ''
63
63
  email: tma@freshbit.ch
64
64
  executables: []