Associations with nested resources raise "prefix_option is missing" exception
ktimothy opened this issue · 1 comments
ktimothy commented
class Base < ActiveResource::Base
self.site = "https://xxx.atlassian.net/rest/servicedeskapi/"
end
class Request < Base
has_many :comments
end
class Comment < Base
self.prefix = "/request/:request_id"
belongs_to :request
end
Trying to get request comments Request.find('XX-1').comments
fails:
~/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activeresource-6.0.0/lib/active_resource/base.rb:1090:in `block in check_prefix_options': request_id prefix_option is missing (ActiveResource::MissingPrefixParam)
rails-bot commented
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails team are limited, and so we are asking for your help.
If it is an issue and you can still reproduce this error on the main
branch,
please reply with all of the information you have about it in order to keep the issue open.
If it is a pull request and you are still interested on having it merged please make sure it can be merged clearly.
Thank you for all your contributions.