You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to update any attribute on Profile through Avo.
Expected behavior & Actual behavior
Expected: Update works.
Actual: Exception it raised with the following backtrace.
NoMethodError: undefined method `to_sym' for an instance of Array
/webapp/vendor/bundle/ruby/3.3.0/gems/avo-3.13.5/lib/avo/fields/belongs_to_field.rb:197:in `to_permitted_param': undefined method `to_sym' for an instance of Array (NoMethodError)
from /webapp/vendor/bundle/ruby/3.3.0/gems/avo-3.13.5/app/controllers/avo/base_controller.rb:277:in `map'
from /webapp/vendor/bundle/ruby/3.3.0/gems/avo-3.13.5/app/controllers/avo/base_controller.rb:277:in `permitted_params'
from /webapp/vendor/bundle/ruby/3.3.0/gems/avo-3.13.5/app/controllers/avo/base_controller.rb:266:in `model_params'
from /webapp/vendor/bundle/ruby/3.3.0/gems/avo-3.13.5/app/controllers/avo/application_controller.rb:200:in `fill_record'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:362:in `block in make_lambda'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:179:in `block in call'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:180:in `call'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:559:in `block in invoke_before'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:559:in `each'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:559:in `invoke_before'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:119:in `block in run_callbacks'
from /webapp/vendor/bundle/ruby/3.3.0/gems/i18n-1.14.6/lib/i18n.rb:353:in `with_locale'
from /webapp/vendor/bundle/ruby/3.3.0/gems/avo-3.13.5/app/controllers/avo/application_controller.rb:287:in `set_avo_locale'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
from /webapp/vendor/bundle/ruby/3.3.0/gems/marginalia-1.11.1/lib/marginalia.rb:109:in `record_query_comment'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
from /webapp/vendor/bundle/ruby/3.3.0/gems/turbo-rails-2.0.10/lib/turbo-rails.rb:24:in `with_request_id'
from /webapp/vendor/bundle/ruby/3.3.0/gems/turbo-rails-2.0.10/app/controllers/concerns/turbo/request_id_tracking.rb:10:in `turbo_tracking_request_id'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actiontext-7.2.1/lib/action_text/rendering.rb:25:in `with_renderer'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actiontext-7.2.1/lib/action_text/engine.rb:71:in `block (4 levels) in <class:Engine>'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:130:in `instance_exec'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
from /webapp/vendor/bundle/ruby/3.3.0/gems/sentry-rails-5.21.0/lib/sentry/rails/controller_transaction.rb:32:in `block in sentry_around_action'
from /webapp/vendor/bundle/ruby/3.3.0/gems/sentry-ruby-5.21.0/lib/sentry/hub.rb:108:in `with_child_span'
from /webapp/vendor/bundle/ruby/3.3.0/gems/sentry-ruby-5.21.0/lib/sentry-ruby.rb:499:in `with_child_span'
from /webapp/vendor/bundle/ruby/3.3.0/gems/sentry-rails-5.21.0/lib/sentry/rails/controller_transaction.rb:18:in `sentry_around_action'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/callbacks.rb:141:in `run_callbacks'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/abstract_controller/callbacks.rb:260:in `process_action'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_controller/metal/rescue.rb:27:in `process_action'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_controller/metal/instrumentation.rb:77:in `block in process_action'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/notifications.rb:210:in `block in instrument'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/notifications/instrumenter.rb:58:in `instrument'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/lib/active_support/notifications.rb:210:in `instrument'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_controller/metal/instrumentation.rb:76:in `process_action'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
from /webapp/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1/lib/active_record/railties/controller_runtime.rb:39:in `process_action'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/abstract_controller/base.rb:163:in `process'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionview-7.2.1/lib/action_view/rendering.rb:40:in `process'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_controller/metal.rb:252:in `dispatch'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_controller/metal.rb:335:in `dispatch'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/routing/route_set.rb:67:in `dispatch'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/routing/route_set.rb:50:in `serve'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/journey/router.rb:53:in `block in serve'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/journey/router.rb:133:in `block in find_routes'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/journey/router.rb:126:in `each'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/journey/router.rb:126:in `find_routes'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/journey/router.rb:34:in `serve'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/routing/route_set.rb:896:in `call'
from /webapp/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/lib/rails/engine.rb:535:in `call'
from /webapp/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/lib/rails/railtie.rb:226:in `public_send'
from /webapp/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/lib/rails/railtie.rb:226:in `method_missing'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/routing/mapper.rb:33:in `block in <class:Constraints>'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/routing/mapper.rb:62:in `serve'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/journey/router.rb:53:in `block in serve'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/journey/router.rb:133:in `block in find_routes'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/journey/router.rb:126:in `each'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/journey/router.rb:126:in `find_routes'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/journey/router.rb:34:in `serve'
from /webapp/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/lib/action_dispatch/routing/route_set.rb:896:in `call'
from /webapp/vendor/bundle/ruby/3.3.0/gems/rack-3.1.7/lib/rack/static.rb:161:in `call'
from /webapp/vendor/bundle/ruby/3.3.0/gems/rack-3.1.7/lib/rack/static.rb:161:in `call'
from /webapp/vendor/bundle/ruby/3.3.0/gems/rack-3.1.7/lib/rack/static.rb:161:in `call'
from /webapp/vendor/bundle/ruby/3.3.0/gems/ra
System configuration
Avo version: 3.13.5
Rails version: 7.2.1
Ruby version: 3.3.0
License type:
Community
Pro
Advanced
Are you using Avo monkey patches, overriding views or view components?
Yes. If so, please post code samples.
No
Impact
High impact (It makes my app un-usable.)
Medium impact (I'm annoyed, but I'll live.)
Low impact (It's really a tiny thing that I could live with.)
Urgency
High urgency (I can't continue development without it.)
Medium urgency (I found a workaround, but I'd love to have it fixed.)
Low urgency (It can wait. I just wanted you to know about it.)
The text was updated successfully, but these errors were encountered:
Fixavo-hq#3334
Fix `NoMethodError: undefined method `to_sym' for an instance of Array` raised by this line when an association uses a composite primary key/foreign key.
Describe the bug
foreign_key.to_sym
on https://github.com/avo-hq/avo/blob/v3.13.5/lib/avo/fields/belongs_to_field.rb#L197 raisesNoMethodError: undefined method
to_sym' for an instance of Array` when an association uses a composite primary key/foreign key.Steps to Reproduce
Have a relationship that uses composite primary/foreign keys.
Try to update any attribute on Profile through Avo.
Expected behavior & Actual behavior
Expected: Update works.
Actual: Exception it raised with the following backtrace.
System configuration
Avo version: 3.13.5
Rails version: 7.2.1
Ruby version: 3.3.0
License type:
Are you using Avo monkey patches, overriding views or view components?
Impact
Urgency
The text was updated successfully, but these errors were encountered: