Skip to content

Fix error: undefined local variable or method `user_model' for CASServer...#224

Merged
mitfik merged 1 commit intorubycas:masterfrom
korun:master
Sep 15, 2014
Merged

Fix error: undefined local variable or method `user_model' for CASServer...#224
mitfik merged 1 commit intorubycas:masterfrom
korun:master

Conversation

@korun
Copy link
Contributor

@korun korun commented Sep 15, 2014

Hello!
This PR contains fix for error:

undefined local variable or method `user_model' for CASServer::Authenticators::SQLEncrypted:Class (NameError)

See #219 for more.

…ver::Authenticators::SQLEncrypted:Class (NameError)
@mitfik
Copy link

mitfik commented Sep 15, 2014

I had that feeling that something will break with that commit =]
Thanks a lot for fast reaction. I will review again all sql_* authenticators to make sure that others are compatible.

mitfik pushed a commit that referenced this pull request Sep 15, 2014
Fix error: undefined local variable or method `user_model' for CASServer...
@mitfik mitfik merged commit 73b89bb into rubycas:master Sep 15, 2014
@davexunit
Copy link
Contributor

@mitfik My apologies for the breakage! I tried my best to avoid such things but I have failed. :( I hope that you still see the patch as an improvement overall.

Apologies and thanks to @korun for fixing this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should actually be:

user_model = user_models[options[:auth_index]]
user_model.__send__(:include, EncryptedPassword)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quick fix to make it work. :)
You, likely, right, so check it yourself, and make PR. :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have done just that. #226

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.

3 participants