closure_tree 3.6.3 → 3.6.4
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.
- data/README.md +8 -2
- data/lib/closure_tree/acts_as_tree.rb +5 -2
- data/lib/closure_tree/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -60,7 +60,7 @@ Note that closure_tree only supports Rails 3.0 and later, and has test coverage
|
|
60
60
|
|
61
61
|
5. Add a database migration to store the hierarchy for your model. By
|
62
62
|
default the table name will be the model's table name, followed by
|
63
|
-
"_hierarchies". Note that by calling ```acts_as_tree```, a "virtual model" (in this case, ```
|
63
|
+
"_hierarchies". Note that by calling ```acts_as_tree```, a "virtual model" (in this case, ```TagHierarchy```)
|
64
64
|
will be added automatically, so you don't need to create it.
|
65
65
|
|
66
66
|
```ruby
|
@@ -361,6 +361,10 @@ Closure tree is [tested under every combination](http://travis-ci.org/#!/mceache
|
|
361
361
|
|
362
362
|
## Change log
|
363
363
|
|
364
|
+
### 3.6.4
|
365
|
+
|
366
|
+
* Use ```.pluck``` when available for ```.ids_from```. Addresses [issue 26](https://github
|
367
|
+
.com/mceachen/closure_tree/issues/26). Thanks, [Chris Sturgill](https://github.com/sturgill)!
|
364
368
|
|
365
369
|
### 3.6.3
|
366
370
|
|
@@ -370,7 +374,7 @@ Closure tree is [tested under every combination](http://travis-ci.org/#!/mceache
|
|
370
374
|
### 3.6.2
|
371
375
|
|
372
376
|
* Fixed [issue 23](https://github.com/mceachen/closure_tree/issues/23), which added support for ```#siblings```
|
373
|
-
when sort_order wasn't specified. Thanks, [
|
377
|
+
when sort_order wasn't specified. Thanks, [Gary Greyling](https://github.com/garygreyling)!
|
374
378
|
|
375
379
|
### 3.6.1
|
376
380
|
|
@@ -473,3 +477,5 @@ a.save
|
|
473
477
|
|
474
478
|
* https://github.com/collectiveidea/awesome_nested_set
|
475
479
|
* https://github.com/patshaughnessy/class_factory
|
480
|
+
* JetBrains, which provides an [open-source license](http://www.jetbrains.com/ruby/buy/buy.jsp#openSource) to
|
481
|
+
[RubyMine](http://www.jetbrains.com/ruby/features/) for the development of this project.
|
@@ -352,10 +352,13 @@ module ClosureTree
|
|
352
352
|
end
|
353
353
|
|
354
354
|
def ids_from(scope)
|
355
|
-
scope.
|
355
|
+
if scope.respond_to? :pluck
|
356
|
+
scope.pluck(:id)
|
357
|
+
else
|
358
|
+
scope.select(:id).collect(&:id)
|
359
|
+
end
|
356
360
|
end
|
357
361
|
|
358
|
-
|
359
362
|
# TODO: _parent_id will be removed in the next major version
|
360
363
|
alias :_parent_id :ct_parent_id
|
361
364
|
|
data/lib/closure_tree/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: closure_tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -192,7 +192,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
192
192
|
version: '0'
|
193
193
|
segments:
|
194
194
|
- 0
|
195
|
-
hash: -
|
195
|
+
hash: -4571923671757630027
|
196
196
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
197
197
|
none: false
|
198
198
|
requirements:
|
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
201
|
version: '0'
|
202
202
|
segments:
|
203
203
|
- 0
|
204
|
-
hash: -
|
204
|
+
hash: -4571923671757630027
|
205
205
|
requirements: []
|
206
206
|
rubyforge_project:
|
207
207
|
rubygems_version: 1.8.23
|