add namespaced entity support

When using namespaced models you need to make sure to chop off the namespace portion of the entity class name before you can evaluate it into method names. I know that you are currently refactoring to use the Entity class making the code below much cleaner. This code can be reduced to a single line in the entity.name function there.
Hi both, I also think so.

Since you both use those namespaces in the wild, can you take a look at a few possible solutions? I propose that once defined something reasonable from anyone point of view we implement it (that should not be a problem). Does that sound fair to you?

Ivan Kolmychek <notifications@github.com> wrote:

>In lib/simple_token_authentication/acts_as_token_authentication_handler.rb:
>
>> @@ -17,8 +17,9 @@ module ActsAsTokenAuthenticationHandlerMethods > end > > def authenticate_entity!(entity_class) > + entity_underscored = entity_class.name.split("::").last.singularize.underscore 
>
>I am not sure about 'last' - this can cause problems when there is two models with same name in different namespaces. Maybe, it's better to do .join('_') instead?
>
>—
>Reply to this email directly or view it on GitHub.￼
>
>{"@context":"http://schema.org","@type":"EmailMessage","description":"View this Pull Request on GitHub","action":{"@type":"ViewAction","url":"https://github.com/gonzalo-bulnes/simple_token_authentication/pull/113/files#r18331558","name":"View Pull Request"}}