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: e9ea11adc017949414ed89c42127ce6867418dcd461219fb56289a2832a938a6
4
- data.tar.gz: 30ab308185ff7e68acebf1611161f55fa5d783bc95536db27a2026091637d69a
3
+ metadata.gz: 41573d568a1fd99ec4100b77846b882c23aadbbf732bb95ddfd066d0c486f095
4
+ data.tar.gz: dff45b87624e0913445bd7c39a4a9868e02786fb6fcddc0bc2693886aeb368dc
5
5
  SHA512:
6
- metadata.gz: 61685a1f498123e153ae0a635805566b69dbf177ad079da95e53221b81c05af957cdc9d8d0de63004d48d74801cf493a7062f303c227f9cdffa08a5834442941
7
- data.tar.gz: 6c80c211396d351891a1c4071672bae515a629d933a128cd3e9f3b5fae4d948e624b9577645cee199bd10e4d6aa55b1aafa1278e4011dc7d1e7a87a60efede3e
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.1.6'
4
+ VERSION = '7.1.7'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.6
4
+ version: 7.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso