rollbar-gem
rollbar-gem copied to clipboard
Support any object as extra data when notifying errors
Currently the extra_data support in rollbar-ruby relies on the object
being of a specific set of types. This is a bit uncessary, as we do
support hashes. So instead of limiting the types by their class name,
lets instead check the response to to_h
(which always returns hash)
and then treat the result as a hash.
This enables support for a larger number of extra_data objects being passed in, including ActiveModel::Errors, the original object that was being passed in at my work.
@bagedevimo Thank you for the PR. A release is coming up in the next couple days. I'd be happy to merge this change if you can update the hash syntax in the spec.