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
When using vanilla Ruby, including hash parameters does not work because the with_indifferent_access method has not been patched onto hashes and is required by lib/active_interaction/filters/hash_filter.rb. This is solved by:
require "active_interaction"
module ActiveInteractionTest
class Interaction < ActiveInteraction::Base
hash :parameters
def execute
puts "All is fine"
end
end
end
ActiveInteractionTest::Interaction.run(parameters: {})
/Users/arice/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/active_interaction-4.0.3/lib/active_interaction/filters/hash_filter.rb:47:in `adjust_output': undefined method `with_indifferent_access' for {}:Hash (NoMethodError)
The text was updated successfully, but these errors were encountered:
When using vanilla Ruby, including hash parameters does not work because the
with_indifferent_access
method has not been patched onto hashes and is required bylib/active_interaction/filters/hash_filter.rb
. This is solved by:Simple example:
The text was updated successfully, but these errors were encountered: