-
-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Exception is raised when association uses a composite primary/foreign key #3334
Closed
3 of 11 tasks
Closed
3 of 11 tasks
Labels
Comments
It can be fixed by changing the offending line for:
|
filipegiusti
added a commit
to filipegiusti/avo
that referenced
this issue
Oct 11, 2024
Fix avo-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.
This was referenced Oct 11, 2024
I created a PR at #3335 but it's missing tests. |
This issue has been marked as stale because there was no activity for the past 15 days. |
Closing this because there was no activity for the past 15 days. Feel free to reopen if new information pops up ✌️ |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
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: