simple_nested_set 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
@@ -67,43 +67,8 @@ when '1.0.1'
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
70
|
-
when '2.0.
|
71
|
-
Gem.patching('arel', '2.0.
|
72
|
-
Arel::Table.class_eval do
|
73
|
-
attr_reader :options # this line is added
|
74
|
-
|
75
|
-
def initialize name, engine = Arel::Table.engine
|
76
|
-
@name = name.to_s
|
77
|
-
@engine = engine
|
78
|
-
@columns = nil
|
79
|
-
@aliases = []
|
80
|
-
@table_alias = nil
|
81
|
-
@primary_key = nil
|
82
|
-
|
83
|
-
if Hash === engine
|
84
|
-
@options = engine # this line is added
|
85
|
-
@engine = engine[:engine] || Arel::Table.engine
|
86
|
-
@columns = attributes_for engine[:columns]
|
87
|
-
|
88
|
-
# Sometime AR sends an :as parameter to table, to let the table know
|
89
|
-
# that it is an Alias. We may want to override new, and return a
|
90
|
-
# TableAlias node?
|
91
|
-
@table_alias = engine[:as] unless engine[:as].to_s == @name
|
92
|
-
end
|
93
|
-
end
|
94
|
-
|
95
|
-
# this whole method is added
|
96
|
-
def as(table_alias)
|
97
|
-
@options ||= {}
|
98
|
-
Arel::Table.new(name, options.merge(:as => table_alias))
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
102
|
-
else # include the latest patch here, if any
|
103
|
-
# this patch is equivalent to the 2.0.4 one, it is only listed here, because
|
104
|
-
# it is the latest version. The when-statements should be merge, once a new
|
105
|
-
# version comes
|
106
|
-
Gem.patching('arel', '2.0.5') do
|
70
|
+
when '2.0.6'
|
71
|
+
Gem.patching('arel', '2.0.6') do
|
107
72
|
Arel::Table.class_eval do
|
108
73
|
attr_reader :options # this line is added
|
109
74
|
|
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:
|
4
|
+
hash: 41
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 27
|
10
|
+
version: 0.0.27
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sven Fuchs
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-02 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|