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

extending the devise_token_auth user model #4

Closed
evbots opened this issue Jul 14, 2014 · 8 comments
Closed

extending the devise_token_auth user model #4

evbots opened this issue Jul 14, 2014 · 8 comments

Comments

@evbots
Copy link

evbots commented Jul 14, 2014

Do you suggest a best practice for extending the User model? Attempting to add associations to the user model. There seem to be many ways to accomplish this.

@lynndylanhurley
Copy link
Owner

My next step is to break out all of the User model methods into a concern. So you will be able to do something like this:

class User < ActiveRecord::Base
  include DeviseTokenAuth::Concerns::UserModel

  # extend the model as you like
  has_many :whatever
end

I also plan to allow for specifying models other than User using a config param.

I hope to release these features within the next day or two.

@evbots evbots changed the title extending the devis_token_auth user model extending the devise_token_auth user model Jul 14, 2014
@lynndylanhurley
Copy link
Owner

@evbots - I just completed work on this. I'll merge into master and push a new release tomorrow morning after I update the documentation.

In the mean time, the code is on this branch:
https://github.com/lynndylanhurley/devise_token_auth/tree/dynamic-user-model

@evbots
Copy link
Author

evbots commented Jul 16, 2014

Thanks - i've been monkey-patching the user model change so far and it's been less than ideal. look forward to your changes.

@lynndylanhurley
Copy link
Owner

I just pushed everything to master. There have been some changes to the configuration process, see the updated readme for details:
https://github.com/lynndylanhurley/devise_token_auth

I'll push another release to rubygems within the next few hours.

@evbots
Copy link
Author

evbots commented Jul 17, 2014

just a heads up I don't think rubygems has been updated yet.

@lynndylanhurley
Copy link
Owner

Oh man I thought I pushed last night! I'll push again to be sure. Thx!
On Jul 17, 2014 11:09 AM, "Evan Botello" notifications@github.com wrote:

just a heads up I don't think rubygems has been updated yet.


Reply to this email directly or view it on GitHub
#4 (comment)
.

@evbots
Copy link
Author

evbots commented Jul 17, 2014

Actually 0.1.22 depends on a newer version of rails than I had. Updated rails and everything worked, thanks.

@lynndylanhurley
Copy link
Owner

Ahh great, thx. I can probably loosen up that dependency. I just started using gemnasium to alert me to out-of-date gems and I think I got a little carried away.

Please let me know if you run into any issues or if the documentation is too confusing. I really appreciate your feedback, @evbots.

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

No branches or pull requests

2 participants