pg_rails 7.1.6 → 7.1.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41573d568a1fd99ec4100b77846b882c23aadbbf732bb95ddfd066d0c486f095
|
4
|
+
data.tar.gz: dff45b87624e0913445bd7c39a4a9868e02786fb6fcddc0bc2693886aeb368dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e94ff6ffb27953e99d8dd053acd9154cb8dec89aff6ee7bdbcfce39214faf5ce9a82d08a8ea95d7717d07ba85a536d9e6c2115431edb1e28296abbc333c4e5c
|
7
|
+
data.tar.gz: f303020f87d6eb6890c6ea13790a8c5c93a4294f44e23188560d8485e48f3999d59902c4d0b48245fbb3e41887678e817df7186c0bddeacdbbdc8bec044a7d6e
|
@@ -20,10 +20,6 @@ module PgEngine
|
|
20
20
|
def index
|
21
21
|
@collection = filtros_y_policy atributos_para_buscar
|
22
22
|
|
23
|
-
shared_context = Ransack::Adapters::ActiveRecord::Context.new(@collection)
|
24
|
-
@q = @clase_modelo.ransack(params[:q], context: shared_context)
|
25
|
-
@collection = shared_context.evaluate(@q)
|
26
|
-
|
27
23
|
pg_respond_index
|
28
24
|
end
|
29
25
|
|
@@ -292,7 +288,11 @@ module PgEngine
|
|
292
288
|
)
|
293
289
|
scope = policy_scope(clase_modelo)
|
294
290
|
|
295
|
-
@filtros.filtrar(scope)
|
291
|
+
scope = @filtros.filtrar(scope)
|
292
|
+
|
293
|
+
shared_context = Ransack::Adapters::ActiveRecord::Context.new(scope)
|
294
|
+
@q = @clase_modelo.ransack(params[:q], context: shared_context)
|
295
|
+
shared_context.evaluate(@q)
|
296
296
|
end
|
297
297
|
|
298
298
|
def default_scope_for_current_model
|
data/pg_rails/lib/version.rb
CHANGED