Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

Allow having token_controller inside namespaces #95

Merged
merged 2 commits into from
Nov 15, 2016

Conversation

albertobajo
Copy link
Contributor

It doesn't take into account non-word characters from the controller name. For example,

class Api::V1::UserTokenController < Knock::AuthTokenController
end

With this patch, entity_name at app/controllers/knock/auth_token_controller.rb returns User instead Api::V1::User.

@HLFH
Copy link

HLFH commented Nov 15, 2016

@sachse @nsarno Hi. Could you consider merging this PR? It is really helpful for full namespace support. I tested it and now this code in /var/www/login_api/app/controllers/api/v1/user_token_controller.rb works:

module Api::V1
  class UserTokenController < Knock::AuthTokenController
  end
end

No more uninitialized constant Api::V1::User!!! So great!!

@nsarno nsarno merged commit ed467d1 into nsarno:master Nov 15, 2016
@nsarno
Copy link
Owner

nsarno commented Nov 15, 2016

Thanks for contributing @albertobajo and everyone for your patience. And thank you for the ping @HLFH :)

@HLFH
Copy link

HLFH commented Nov 21, 2016

@nsarno Thanks for merging. Shouldn't we get a v2.0.1 or v.2.1 release for this solved issue? =)

@albertobajo albertobajo deleted the token-controller-namespace branch November 21, 2016 16:43
@HLFH
Copy link

HLFH commented Jan 6, 2017

@nsarno Hi. Could we get soon a 2.1 release please with this fix?

@HLFH HLFH mentioned this pull request Jan 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants