You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module ExampleConcern
extend ActiveSupport::Concern
included do
hash :some_hash, default: {}, strip: false
end
end
And I'm subsequently getting an error on the hash: Too many arguments to Object#hash from Typecheck – it looks at Object#hash instead of ActiveInteraction#hash
This behavior makes sense as it can't really know that the concern is going to be included in a file that overrides hash, but I'm wondering if there's any recommended workaround to avoid this error as this is a fairly common pattern in our codebase
I believe I can add something to definitions.rb to solve, but I haven't been able to figure it out
The text was updated successfully, but these errors were encountered:
So the situation I'm running into is I have an interaction (using ActiveInteraction which overrides
hash
):and that interaction includes a Rails concern:
And I'm subsequently getting an error on the hash:
Too many arguments to Object#hash
from Typecheck – it looks atObject#hash
instead ofActiveInteraction#hash
This behavior makes sense as it can't really know that the concern is going to be included in a file that overrides
hash
, but I'm wondering if there's any recommended workaround to avoid this error as this is a fairly common pattern in our codebaseI believe I can add something to
definitions.rb
to solve, but I haven't been able to figure it outThe text was updated successfully, but these errors were encountered: