arql 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/arql/definition.rb +10 -2
- data/lib/arql/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 354500851ea6169979e5d9b3e27abb9a45ed43d3945bf94ade6705603930f96c
|
4
|
+
data.tar.gz: b17a8353faa43df65c9f66441631836b4ee4136425dce7183a49119881a8f70b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8cd8292e60d3d68eed8ae877429ed87d88ebbb491f76de390d64b2566edaa82a34e0cb84ffae0ca433065c592f046649e476935d10b0daa803f25ca7aff5e0d
|
7
|
+
data.tar.gz: 554c2b9db30566fe243d114d329bc3ee2dcf97fbe3e7ee3a3b7570837ce8d717410e8e07dc38e3d3d1a3092abf0d1f2f91685475b89152cd02d6dd258fd58939
|
data/Gemfile.lock
CHANGED
data/lib/arql/definition.rb
CHANGED
@@ -76,6 +76,16 @@ module Arql
|
|
76
76
|
model[:comment] = @comments[table_name]
|
77
77
|
@models << model
|
78
78
|
end
|
79
|
+
|
80
|
+
order_column = @options[:order_column]
|
81
|
+
if order_column
|
82
|
+
Thread.new do
|
83
|
+
@models.each do |model|
|
84
|
+
model_class = model[:model]
|
85
|
+
model_class.implicit_order_column = order_column if model_class.column_names.include?(order_column)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
79
89
|
end
|
80
90
|
|
81
91
|
def model_names_mapping
|
@@ -144,8 +154,6 @@ module Arql
|
|
144
154
|
end
|
145
155
|
self.table_name = table_name
|
146
156
|
self.inheritance_column = nil
|
147
|
-
order_column = options[:order_column]
|
148
|
-
self.implicit_order_column = order_column if order_column
|
149
157
|
ActiveRecord.default_timezone = :local
|
150
158
|
if options[:created_at].present?
|
151
159
|
define_singleton_method :timestamp_attributes_for_create do
|
data/lib/arql/version.rb
CHANGED