avo 2.13.5.pre.1 → 2.13.5.pre.2

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: d13118394ed2fd514b0236aafbe55beff06d3cd6f54888df9e231524c603fd4f
4
- data.tar.gz: a41d61fb7241a466663385cad7c912eaf9a57f872dd116f5bedfac6c64b5b935
3
+ metadata.gz: 1ac27367850b66ed5118891624a6480086e08d5e781a186cc766af138cff1c77
4
+ data.tar.gz: 59c4765ea8e68bbfc5e088c6b9a3bad11c3f8ece23f3090793299ea414094086
5
5
  SHA512:
6
- metadata.gz: f17278e4f58a79fea9c0fe1404167813c424b03a686e4463d477f775b11d44ecd971d53b12b4c981a7e9ba466b38e85d511947b4217b2879907e1822d94be6a1
7
- data.tar.gz: a3f51221de5fff7a000591e6a643c49b4e84deb27f3b23848dc514e07697781b7c795a26c8261d2c9884be2c3de2cb65b9c841fb2e5cfb384ea24b2d459393fd
6
+ metadata.gz: ce476b0f388b16f1f27e96e94499a30fe35a59acea7997aa5a72f16ba0e85bf86d1b2f79481b69eb32504bcb58a27f7355a4e004983072e216fd117b9c836e67
7
+ data.tar.gz: 413d0a5063903155f3915a309d8291d5cea91192d971b4899b7ed5a8a21eae7f295458aacb34eaa10f2ccea76656a0c9b01393a4048769d9b7587882f3bc6ce2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.13.5.pre.1)
4
+ avo (2.13.5.pre.2)
5
5
  active_link_to
6
6
  addressable
7
7
  breadcrumbs_on_rails
@@ -9,10 +9,9 @@ class Avo::BaseComponent < ViewComponent::Base
9
9
 
10
10
  private
11
11
 
12
- # Figure out what is the corresponding field for this @reflection
12
+ # Use the @parent_resource to fetch the field using the @reflection name.
13
13
  def field
14
- fields = ::Avo::App.get_resource_by_model_name(@reflection.active_record.name).get_field_definitions
15
- fields.find { |f| f.id == @reflection.name }
14
+ @parent_resource.get_field_definitions.find { |f| f.id == @reflection.name }
16
15
  rescue
17
16
  nil
18
17
  end
@@ -4,6 +4,7 @@ class Avo::ResourceComponent < Avo::BaseComponent
4
4
  attr_reader :has_many_panels
5
5
  attr_reader :has_as_belongs_to_many_panels
6
6
  attr_reader :resource_tools
7
+ attr_reader :resource
7
8
  attr_reader :view
8
9
 
9
10
  def can_create?
@@ -4,9 +4,6 @@ class Avo::Views::ResourceEditComponent < Avo::ResourceComponent
4
4
  include Avo::ResourcesHelper
5
5
  include Avo::ApplicationHelper
6
6
 
7
- attr_reader :resource
8
- attr_reader :view
9
-
10
7
  def initialize(resource: nil, model: nil, actions: [], view: :edit)
11
8
  @resource = resource
12
9
  @model = model
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.13.5.pre.1" unless const_defined?(:VERSION)
2
+ VERSION = "2.13.5.pre.2" 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.13.5.pre.1
4
+ version: 2.13.5.pre.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin