reload no longer works
markwpiper opened this issue · 1 comments
markwpiper commented
Rails no longer passes the options hash through from reload to find, which breaks the mechanism obfuscate_id is using to reload. (Tested on ActiveRecord 4.0.9)
Obfuscate_id's override relies on the :no_obfuscated_id being passed to find, but this no longer gets passed.
def reload(options = nil)
options = (options || {}).merge(:no_obfuscated_id => true)
super(options)
end
As a result, calling .reload on an object tries to .find the object and deobfuscates an already deobfuscated ID, causing it to fail.
namick commented
This has been fixed in the Rails 4.1 and 4.2 releases.