express_admin 1.7.29 → 1.7.30
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d82b87132256121784e3e892a5a0d3aaaad7e4e9
|
4
|
+
data.tar.gz: 3ef8d6949a69b5e92cb3f39f6ac085bc0829a0e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f02135bc0897a255a969b7087e1082bdafa587767780575f98948f7d2c8cfc948e840025ec28046ae3e6e953573634dab138882ec8db5e6e21392353c1b7c33a
|
7
|
+
data.tar.gz: 52b48b4e451a52e14d5b9df7dda7605b81361030fa0e524533b7842dae327d323d1fe73130d63f1c564583853c55c5f8e17ce66c5f8ef4e062439a701137f82c
|
@@ -237,11 +237,15 @@ module ExpressAdmin
|
|
237
237
|
else
|
238
238
|
resource_class
|
239
239
|
end
|
240
|
-
filtered_scope = filter(scope) # TODO: Removed the conditionally invoked .all
|
240
|
+
filtered_scope = filter(ordered_scope(scope)) # TODO: Removed the conditionally invoked .all
|
241
241
|
# scope = params[:asc] || params[:desc] ? sort_table(scope) : scope
|
242
242
|
self.instance_variable_set(collection_ivar, filtered_scope)
|
243
243
|
end
|
244
244
|
|
245
|
+
def ordered_scope(scope)
|
246
|
+
scope
|
247
|
+
end
|
248
|
+
|
245
249
|
def filter(scope)
|
246
250
|
if _filter_field
|
247
251
|
scope.kind_of?(Array) ? _array_filter(scope) : _sql_filter(scope)
|
@@ -67,7 +67,7 @@ module ExpressAdmin
|
|
67
67
|
test "#index should expose a collection of resources" do
|
68
68
|
widgets_controller.index
|
69
69
|
assert collection, "@widgets not provided by #index"
|
70
|
-
refute collection.empty?, "@widgets is empty"
|
70
|
+
refute collection.all.empty?, "@widgets is empty"
|
71
71
|
end
|
72
72
|
|
73
73
|
test "#edit should expose an instance of resource if found" do
|
data/test/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20150928044202) do
|
15
15
|
|
16
16
|
create_table "categories", force: :cascade do |t|
|
17
17
|
t.string "name"
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|