This project is archived and is in readonly mode.
ActiveResource::Base.prefix isn't reset correctly when ActiveResource::Base.site is reset.
-
Matthew Moore
It seems odd to me that the prefix is stored in a method (by redefining a method when it's set), rather than a variable.
Was there any method to this madness? Why it shouldn't just be stored in a class variable?
-
Michael Koziarski
- Milestone cleared.
Short version is that class variables don't play nice with inheritance. So if you set it on ChildClass it overrides ParentClass
-
Michael Koziarski
- Assigned user changed from Michael Koziarski to Rick
Assigning to rick as he uses ares, feel free to remove the 2.3 blocker if it's not immediately obvious how to fix it.
-
Rick
Because #prefix has to take an options parameter. If you set it to something like "/projects/:project_id", the prefix method will look something like this:
def prefix(options = {}) "/projects/#{options[:project_id]}" end Message.prefix(:project_id => 1) # => "/projects/1" -
Rick
- State changed from new to committed
I committed a fix to my rails fork, let me know if it works out.