acts_as_tree 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +0 -3
- data/README.md +1 -1
- data/lib/acts_as_tree/version.rb +1 -1
- data/lib/acts_as_tree.rb +21 -0
- metadata +8 -8
data/.travis.yml
CHANGED
data/README.md
CHANGED
data/lib/acts_as_tree/version.rb
CHANGED
data/lib/acts_as_tree.rb
CHANGED
@@ -1,2 +1,23 @@
|
|
1
1
|
require 'acts_as_tree/active_record/acts/tree'
|
2
2
|
require 'acts_as_tree/version'
|
3
|
+
|
4
|
+
module ActsAsTree
|
5
|
+
if defined? Rails::Railtie
|
6
|
+
require 'rails'
|
7
|
+
class Railtie < Rails::Railtie
|
8
|
+
initializer 'acts_as_tree.insert_into_active_record' do
|
9
|
+
ActiveSupport.on_load :active_record do
|
10
|
+
ActsAsTree::Railtie.insert
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class Railtie
|
17
|
+
def self.insert
|
18
|
+
if defined?(ActiveRecord)
|
19
|
+
ActiveRecord::Base.send(:include, ActiveRecord::Acts::Tree)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
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: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,11 +12,11 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2012-04-
|
15
|
+
date: 2012-04-18 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activerecord
|
19
|
-
requirement: &
|
19
|
+
requirement: &70288490534000 !ruby/object:Gem::Requirement
|
20
20
|
none: false
|
21
21
|
requirements:
|
22
22
|
- - ! '>='
|
@@ -24,10 +24,10 @@ dependencies:
|
|
24
24
|
version: 3.0.0
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
|
-
version_requirements: *
|
27
|
+
version_requirements: *70288490534000
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: sqlite3
|
30
|
-
requirement: &
|
30
|
+
requirement: &70288490533300 !ruby/object:Gem::Requirement
|
31
31
|
none: false
|
32
32
|
requirements:
|
33
33
|
- - ! '>='
|
@@ -35,10 +35,10 @@ dependencies:
|
|
35
35
|
version: '0'
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
|
-
version_requirements: *
|
38
|
+
version_requirements: *70288490533300
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: rdoc
|
41
|
-
requirement: &
|
41
|
+
requirement: &70288490532580 !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
43
|
requirements:
|
44
44
|
- - ! '>='
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
version: '0'
|
47
47
|
type: :development
|
48
48
|
prerelease: false
|
49
|
-
version_requirements: *
|
49
|
+
version_requirements: *70288490532580
|
50
50
|
description: A gem that adds simple support for organizing ActiveRecord models into
|
51
51
|
parent–children relationships.
|
52
52
|
email:
|