avo 3.0.0.pre7 → 3.0.0.pre8

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of avo might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe5b6765044687c412c2fd89cf479e3e1fe775f6eb0519824cc63c7bd3a651b2
4
- data.tar.gz: f65add1a904af96f6464e22bd1c86464111c4a46f03e9a8375452fffd6afce5e
3
+ metadata.gz: 1330e65c3c0ee5eda7738928fe8b9dc98a75df09fc9d30012e94c714767233b1
4
+ data.tar.gz: ab36b3c80f8ae22c48fc2529373b507616746c6f7e711ebff1210c902a1b3a9d
5
5
  SHA512:
6
- metadata.gz: 47d6fe1f910683c701cbdc253c879f2415de5f9744237a496a6abc0237cce464f609f4c6c598870e7f119bf1e71f19f817e223973dc4881d3527f8559030c0f3
7
- data.tar.gz: 731535291627256c234a5eeded5ad7854f89a25a399a201b5f76a94d9c74d87793cfb0dd25f44f31ae1b7f590203f3393b28089c080b2fdaca8a8282b2b790e7
6
+ metadata.gz: c351cedaf01797b64483591b0f5a96bb4ee1dedef576df314b55d7bb668505e601220b4eef33cabdebcf19162508adbc4ad49f6326cad2932d2fe792e31e848f
7
+ data.tar.gz: 4aa891eab38f40b7468f43327e26175963b9c1e95016d09756ddac428863e69e3ad000124d04e67570c0f9a1d7ff73196b282b4de76a45f4856814296d04dea3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (3.0.0.pre7)
4
+ avo (3.0.0.pre8)
5
5
  actionview (>= 6.1)
6
6
  active_link_to
7
7
  activerecord (>= 6.1)
@@ -53,9 +53,7 @@ module Avo
53
53
  class_attribute :grid_loader
54
54
  class_attribute :visible_on_sidebar, default: true
55
55
  class_attribute :unscoped_queries_on_index, default: false
56
- class_attribute :resolve_index_query
57
- class_attribute :resolve_find_scope
58
- # TODO: refactor this into a Host without args
56
+ class_attribute :index_query
59
57
  class_attribute :find_record_method, default: -> {
60
58
  query.find id
61
59
  }
@@ -111,8 +109,8 @@ module Avo
111
109
 
112
110
  # This resolves the scope when doing "where" queries (not find queries)
113
111
  def query_scope
114
- final_scope = if resolve_index_query.present?
115
- Avo::ExecutionContext.new(target: resolve_index_query, query: model_class).handle
112
+ final_scope = if index_query.present?
113
+ Avo::ExecutionContext.new(target: index_query, query: model_class).handle
116
114
  else
117
115
  model_class
118
116
  end
@@ -122,13 +120,7 @@ module Avo
122
120
 
123
121
  # This resolves the scope when finding records (not "where" queries)
124
122
  def find_scope
125
- final_scope = if resolve_find_scope.present?
126
- Avo::ExecutionContext.new(target: resolve_find_scope, query: model_class).handle
127
- else
128
- model_class
129
- end
130
-
131
- authorization.apply_policy final_scope
123
+ authorization.apply_policy model_class
132
124
  end
133
125
 
134
126
  def authorization
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "3.0.0.pre7" unless const_defined?(:VERSION)
2
+ VERSION = "3.0.0.pre8" unless const_defined?(:VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.pre7
4
+ version: 3.0.0.pre8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin