Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Openstruct instead of Hash for @json field in RingCaptchaVerification #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

riccardomarotti
Copy link

I made these changes, because the valid? method didn't work.
@status field is always nil, then @status == "SUCCESS" is always false.
Moreover, when delegating, for example, :status to the @json hash, errors happen.
Something like

undefined method `status' for {*hash_contents*}:Hash

Maybe I'm missing something, in this case, please, tell me what I'm getting wrong.
Anyway, with these changes, I can make this gem work in my application.

in RingCaptchaVerification data was saved in a Hash, but, this way
delegation didn't work.
Using OpenStruct delegation works.
@cyb-
Copy link

cyb- commented Nov 23, 2017

I made exactly the same changes before viewing your pull request !!
thanks for confirmation ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants