Skip to content

Commit

Permalink
resource is an association, not an attribute, add getter/setter aliases
Browse files Browse the repository at this point in the history
Fixes:

ManageIQ::Providers::Awx::AutomationManager::Credential model aliases `resource`, but `resource` is not an attribute. Starting in Rails 7.2, alias_attribute with non-attribute targets will raise. Use `alias_method :manager, :resource` or define the method manually
  • Loading branch information
jrafanie committed Oct 30, 2024
1 parent fbc7cf5 commit d00c33c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ class ManageIQ::Providers::Awx::AutomationManager::Credential < ManageIQ::Provid
# CUD operations in the TowerApi concern

alias_attribute :manager_id, :resource_id
alias_attribute :manager, :resource
alias_method :manager, :resource
alias_method :manager=, :resource=

include ManageIQ::Providers::Awx::AutomationManager::TowerApi
include ProviderObjectMixin
Expand Down

0 comments on commit d00c33c

Please sign in to comment.