avo 2.5.2.pre.3 → 2.5.2.pre.4

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: 7963cde66a3c52ebd99d73a2b14cc49a8c01903e3c7250591d056002fcfc6925
4
- data.tar.gz: 630dc0c27f4375f99d74d246ce7196b1f8c4ae5b2039b122dbbc57fd50475e85
3
+ metadata.gz: 22511d72c9065fbb776ed546dd2522554cdface044c11d6418b81807a32793f5
4
+ data.tar.gz: 4bd69e6ec75df792913f43dcd2e39d892cf5299e596647e78545cc7bf49fac03
5
5
  SHA512:
6
- metadata.gz: f6f92981960f52d4c79b5969e674698aedc5d0d8426b1b2071a3b185e66e1aa29de3f342131674238d1bda00ce3aa5db54a04e04d3b78cea79b40753b1f7a236
7
- data.tar.gz: 96b8f246246896b659e21a0fa5c4aa70a547bc9137d387c7c2e1b04aba41038cf28559a576715b3c6cd53c36c7c16ec7f701bb509fea8985615f98548499d00e
6
+ metadata.gz: 1d16808f6a6a533e1fd4b942fb303a8c5af1286a245bd532e1a71bcf2f9302f548c49bc9e50821e4cfc1b1cb92388e3d92f0dc7dba3cfb38c2b957aab3e0f984
7
+ data.tar.gz: c063076faed31f2d712a7c44e76db798ac99e7f37ae18fb4132217ac7980d6da8b79ecaae2b4ea5d526e1cccd0b4688694c4010375c549ad6850bcc039d3088b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.5.2.pre.3)
4
+ avo (2.5.2.pre.4)
5
5
  active_link_to
6
6
  addressable
7
7
  breadcrumbs_on_rails
@@ -248,8 +248,6 @@ GEM
248
248
  nokogiri (1.13.4)
249
249
  mini_portile2 (~> 2.8.0)
250
250
  racc (~> 1.4)
251
- nokogiri (1.13.4-x86_64-linux)
252
- racc (~> 1.4)
253
251
  orm_adapter (0.5.0)
254
252
  pagy (5.10.1)
255
253
  activesupport
@@ -7553,14 +7553,6 @@ progress[value]::-moz-progress-bar{
7553
7553
  line-height:1rem
7554
7554
  }
7555
7555
 
7556
- .text-\[15px\]{
7557
- font-size:15px
7558
- }
7559
-
7560
- .text-\[14px\]{
7561
- font-size:14px
7562
- }
7563
-
7564
7556
  .font-semibold{
7565
7557
  font-weight:600
7566
7558
  }
@@ -46,8 +46,8 @@ module Avo
46
46
  query = @authorization.apply_policy @attachment_class
47
47
 
48
48
  # Add the association scope to the query scope
49
- if @field.scope.present?
50
- query = Avo::Hosts::AssociationScopeHost.new(block: @field.scope, query: query, parent: @model).handle
49
+ if @field.attach_scope.present?
50
+ query = Avo::Hosts::AssociationScopeHost.new(block: @field.attach_scope, query: query, parent: @model).handle
51
51
  end
52
52
 
53
53
  @options = query.all.map do |model|
@@ -51,12 +51,12 @@ module Avo
51
51
  # Fetch the field
52
52
  field = belongs_to_field
53
53
 
54
- if field.scope.present?
54
+ if field.attach_scope.present?
55
55
  # Fetch the parent
56
56
  parent = params[:via_reflection_class].safe_constantize.find params[:via_reflection_id]
57
57
 
58
58
  # Add to the query
59
- query = Avo::Hosts::AssociationScopeHost.new(block: belongs_to_field.scope, query: query, parent: parent).handle
59
+ query = Avo::Hosts::AssociationScopeHost.new(block: belongs_to_field.attach_scope, query: query, parent: parent).handle
60
60
  end
61
61
  end
62
62
 
@@ -50,5 +50,8 @@
50
50
  <% end %>
51
51
  <%= render partial: "avo/partials/scripts" %>
52
52
  <!-- Avo version: <%= Avo::VERSION %> -->
53
+ <!-- Environment: <%= Rails.env %> -->
54
+ <!-- License ID: <%= Avo::App.license.id %> -->
55
+ <!-- License valid?: <%= Avo::App.license.valid ? "valid" : "invalid" %> -->
53
56
  </body>
54
57
  </html>
@@ -62,7 +62,7 @@ module Avo
62
62
  attr_reader :relation_method
63
63
  attr_reader :types # for Polymorphic associations
64
64
  attr_reader :allow_via_detaching
65
- attr_reader :scope
65
+ attr_reader :attach_scope
66
66
  attr_reader :polymorphic_help
67
67
 
68
68
  def initialize(id, **args, &block)
@@ -75,7 +75,7 @@ module Avo
75
75
  @types = args[:types]
76
76
  @relation_method = id.to_s.parameterize.underscore
77
77
  @allow_via_detaching = args[:allow_via_detaching] == true
78
- @scope = args[:scope]
78
+ @attach_scope = args[:attach_scope]
79
79
  @polymorphic_help = args[:polymorphic_help]
80
80
  end
81
81
 
@@ -117,8 +117,8 @@ module Avo
117
117
 
118
118
  query = Avo::Services::AuthorizationService.apply_policy(user, resource.class.query_scope)
119
119
 
120
- if scope.present?
121
- query = Avo::Hosts::AssociationScopeHost.new(block: scope, query: query, parent: get_model).handle
120
+ if attach_scope.present?
121
+ query = Avo::Hosts::AssociationScopeHost.new(block: attach_scope, query: query, parent: get_model).handle
122
122
  end
123
123
 
124
124
  query.all.map do |model|
@@ -3,12 +3,14 @@ module Avo
3
3
  class HasBaseField < BaseField
4
4
  attr_accessor :display
5
5
  attr_accessor :scope
6
+ attr_accessor :attach_scope
6
7
  attr_accessor :description
7
8
 
8
9
  def initialize(id, **args, &block)
9
10
  super(id, **args, &block)
10
11
 
11
12
  @scope = args[:scope].present? ? args[:scope] : nil
13
+ @attach_scope = args[:attach_scope].present? ? args[:attach_scope] : nil
12
14
  @display = args[:display].present? ? args[:display] : :show
13
15
  @searchable = args[:searchable] == true
14
16
  @description = args[:description]
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.5.2.pre.3" unless const_defined?(:VERSION)
2
+ VERSION = "2.5.2.pre.4" 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: 2.5.2.pre.3
4
+ version: 2.5.2.pre.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin