avo 3.5.6 → 3.5.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: 6c24c04902a3f17b4a3b396d9ff592290c8b5b8cc3ece5b6000a1baedfa294f4
4
- data.tar.gz: 297fbfd4e5d45cd6dc6b8692733b4773ecbd863ff8e5c77dbcfdb16e51885b1a
3
+ metadata.gz: 69bdf3209c63771bace6e51362f1d569640f62f06e997dd0b5d8c2a605619846
4
+ data.tar.gz: d78d3c50bab5be7bac39e2f1ec5ba99db8f6aaf8c563cf9210445f92afa18678
5
5
  SHA512:
6
- metadata.gz: 6268590bd9d34ebc5a2fd50f22467cee9366b974e4d2ef58e9537d2af4a766146d87cdfee590060df16bec2c1f937cd48b87fab789f412e443426e279f911a5d
7
- data.tar.gz: f1e5b8fecc7bbe16d305674e1093bcbca9192698c7a9e478b365bfd749021366451d8300f8c685fcea19c4a1cea4095b25af1e420e563c64d769fbbfe335d273
6
+ metadata.gz: 8c740f0a1453120877a435fa43d137a877d2e023d9514cda7f4a09080cec7eb7ec2e1d47067246bf2a8a0820a05c4c87be3af22e64711b00bfc1c4e4cd104d24
7
+ data.tar.gz: 3a4c45b65648541f82cd350bf5fae3275041c82383967b99824f4952428f7b2946698057a7d99c77071ba8c57f0609f534c55fb4137643be1b020bd8f8c904bb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (3.5.6)
4
+ avo (3.5.7)
5
5
  actionview (>= 6.1)
6
6
  active_link_to
7
7
  activerecord (>= 6.1)
@@ -8,8 +8,8 @@ module Avo
8
8
  before_action :set_resource
9
9
  before_action :set_applied_filters, only: :index
10
10
  before_action :set_record, only: [:show, :edit, :destroy, :update, :preview]
11
+ before_action :set_record_to_fill, only: [:new, :edit, :create, :update]
11
12
  before_action :detect_fields
12
- before_action :set_record_to_fill
13
13
  before_action :set_edit_title_and_breadcrumbs, only: [:edit, :update]
14
14
  before_action :fill_record, only: [:create, :update]
15
15
  # Don't run base authorizations for associations
@@ -102,8 +102,9 @@ module Avo
102
102
  end
103
103
 
104
104
  def new
105
- @record = @resource.model_class.new
106
- @resource = @resource.hydrate(record: @record, view: :new, user: _current_user)
105
+ # Record is already hydrated on set_record_to_fill method
106
+ @record = @resource.record
107
+ @resource.hydrate(view: :new, user: _current_user)
107
108
 
108
109
  # Handle special cases when creating a new record via a belongs_to relationship
109
110
  if params[:via_belongs_to_resource_class].present?
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "3.5.6" unless const_defined?(:VERSION)
2
+ VERSION = "3.5.7" 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.5.6
4
+ version: 3.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-04-03 00:00:00.000000000 Z
13
+ date: 2024-04-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord