acts_as_tree 1.6.1 → 2.0.0
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 +4 -4
- data/README.md +17 -15
- data/lib/acts_as_tree.rb +1 -1
- data/lib/acts_as_tree/version.rb +1 -1
- data/test/acts_as_tree_test.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 780f4a181d2e28b847648e7fcacd7e29e29fbea9
|
4
|
+
data.tar.gz: db729268df6e10dbbbfc4626b3c279c4f5a38b4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4df9150dac385c3ebcc0e365d7c9031bc6e535f874ff7e5118c476fd455e36d3887a943f37c8299fda98851321ca5bac9deb3deb90a8ec52bf90c9e1eda58ab6
|
7
|
+
data.tar.gz: cabc21ab491173998e506372b08adea1b3ee695ef25cbf4a88ef23e1f34cf9e3d80e54ffe671505a3cb6931df55260baa4b0361ae9b3ea52c1a84e8892cf4e44
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# ActsAsTree
|
2
|
-
[travis]
|
3
|
-
|
1
|
+
# ActsAsTree
|
2
|
+
[](http://travis-ci.org/amerine/acts\_as\_tree)
|
3
|
+
[](http://badge.fury.io/rb/acts\_as\_tree)
|
4
4
|
|
5
5
|
ActsAsTree extends ActiveRecord to add simple support for organizing items into parent–children relationships. By default, ActsAsTree expects a foreign key column called `parent_id`.
|
6
6
|
|
@@ -21,11 +21,11 @@ root.children # => [child1]
|
|
21
21
|
root.children.first.children.first # => subchild1
|
22
22
|
```
|
23
23
|
|
24
|
-
We also have a convenient `
|
24
|
+
We also have a convenient `TreeView` module you can mixin if you want a little visual representation of the tree strucuture. Example:
|
25
25
|
|
26
26
|
```ruby
|
27
27
|
class Category < ActiveRecord::Base
|
28
|
-
extend ActsAsTree::
|
28
|
+
extend ActsAsTree::TreeView
|
29
29
|
|
30
30
|
acts_as_tree order: "name"
|
31
31
|
end
|
@@ -48,37 +48,39 @@ We no longer support Ruby 1.8 or versions of Rails/ActiveRecord older than 3.0.
|
|
48
48
|
Moving forward we will do our best to support the latest versions of ActiveRecord and Ruby.
|
49
49
|
|
50
50
|
## Change Log
|
51
|
-
*
|
52
|
-
*
|
51
|
+
* 2.0.0 - July 3, 2014
|
52
|
+
* Renamed Presentation module to TreeView, see #27, #28 -- felixbuenemann
|
53
|
+
* 1.6.1 - May 29, 2014
|
54
|
+
* Readme Improvements, see #26 -- schlick
|
53
55
|
* Improvements and Fixes for counter cache (fix counter\_cache: true). See #24, #25 -- dv
|
54
56
|
* Cleanup and fix tests, see #24.
|
55
57
|
* 1.6.0 - April 21, 2014
|
56
58
|
* Added new `leaves` method. See #23 -- MichalPokorny
|
57
59
|
* 1.5.1 - March 28, 2014
|
58
60
|
* Fixing descendants modification bug. See #20 -- amerine, tmuerell
|
59
|
-
* 1.5.0 - December
|
61
|
+
* 1.5.0 - December 16, 2013
|
60
62
|
* Added new `descendants` method -- adamkleingit
|
61
63
|
* Fixed warning message -- akicho8
|
62
|
-
* 1.4.0 - June
|
64
|
+
* 1.4.0 - June 25, 2013
|
63
65
|
* `Presentation#tree_view` -- rainchen
|
64
66
|
* `root?` && `leaf?` methods. -- xuanxu
|
65
|
-
* 1.3.0 - March
|
67
|
+
* 1.3.0 - March 29, 2013
|
66
68
|
* Rails 4.0 Support! -- mischa78
|
67
69
|
* Readme Fixes -- mischa78 & seanhussey
|
68
|
-
* 1.2.0 - October
|
70
|
+
* 1.2.0 - October 29, 2012
|
69
71
|
* Adding new `self_with_ancestors` accessor -- felixbuenemann
|
70
72
|
* `roots` is now a scope.
|
71
|
-
* 1.1.0 - April
|
73
|
+
* 1.1.0 - April 24, 2012
|
72
74
|
* Deprecate the ActiveRecord::Acts::Tree module in favor of ActsAsTree
|
73
|
-
* 1.0.1 - April
|
75
|
+
* 1.0.1 - April 18, 2012
|
74
76
|
* Include the Railtie for easier loading in Rails. Will reassess the forced module inclusion in the future.
|
75
|
-
* 1.0.0 - April
|
77
|
+
* 1.0.0 - April 14, 2012
|
76
78
|
* Official 1.0 release. Force users to include the ActiveRecord::Acts::Tree module.
|
77
79
|
* 0.2.0 - April 9, 2012
|
78
80
|
* Rails 3 Support
|
79
81
|
* 0.1.1 - February 3, 2010
|
80
82
|
* Bug Fixes
|
81
|
-
* 0.1.0 - October
|
83
|
+
* 0.1.0 - October 9, 2009
|
82
84
|
* First Gem Release
|
83
85
|
|
84
86
|
## Note on Patches/Pull Requests
|
data/lib/acts_as_tree.rb
CHANGED
data/lib/acts_as_tree/version.rb
CHANGED
data/test/acts_as_tree_test.rb
CHANGED
@@ -249,7 +249,7 @@ class TreeTest < MiniTest::Unit::TestCase
|
|
249
249
|
|
250
250
|
def test_tree_view
|
251
251
|
assert_equal false, Mixin.respond_to?(:tree_view)
|
252
|
-
Mixin.extend ActsAsTree::
|
252
|
+
Mixin.extend ActsAsTree::TreeView
|
253
253
|
assert_equal true, TreeMixin.respond_to?(:tree_view)
|
254
254
|
|
255
255
|
tree_view_outputs = <<-END.gsub(/^ {6}/, '')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Dahlstrand
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2014-
|
15
|
+
date: 2014-07-03 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activerecord
|