Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Add option to configure FaradayMiddleware::Mashify mash_class #213

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattruzicka
Copy link

I needed something like this in order to turn off this warning in the logs:

WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#count defined in Enumerable. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.

I put this code in an initializer:

class InstaMash < ::Hashie::Mash
  disable_warnings
end

Instagram.configure do |config|
  config.mash_class = InstaMash
end

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.

@icco
Copy link

icco commented Apr 7, 2017

Checkout https://github.com/icco/instagram-continued, this may have already fixed your issue.

@zhu1230
Copy link

zhu1230 commented Jan 13, 2018

see icco#17, this PR fixed the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants