Devise Functionality

17 views
Skip to first unread message

William G.K. Zhang

unread,
Apr 11, 2013, 11:32:51 PM4/11/13
to mongo...@googlegroups.com
Hey Sam, in the Devise mailing list, you said that you may make some additional modifications to this gist and perhaps submit that as a pull request or make a gem based around it.  Any update to that by any chance? 

Thanks,
William Zhang

Sam Pohlenz

unread,
Apr 17, 2013, 7:28:17 AM4/17/13
to mongo...@googlegroups.com, Zhang, William
Hi William,

I haven't had a chance yet to revisit that code yet, particularly as I rarely use Devise. Are you currently using the code from the gist successfully? If so, I may consider that a vote to put something together soon.

Alternatively, if you feel like putting together your own gem based on the code (e.g. mongomodel-devise), I'd be more than happy to endorse it by linking it from the MongoModel README.

Regards,
Sam

William G.K. Zhang wrote:
--
You received this message because you are subscribed to the Google Groups "MongoModel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongomodel+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
Sam Pohlenz | Wheelhouse Labs | www.wheelhousecms.com
+61 8 8842 1872 | @spohlenz | Skype: SamPohlenz

William G.K. Zhang

unread,
Apr 17, 2013, 5:33:50 PM4/17/13
to mongo...@googlegroups.com
I have not actually used it just yet but I will be doing so shortly.  I'll report back and let you know if I find any issues.

William "G.K." Zhang

unread,
Jun 19, 2013, 3:55:15 PM6/19/13
to mongo...@googlegroups.com
I've been using this gist for a few months now and pretty much everything has been going pretty well.  It's been relatively pain free and I'm really happy with it.  

I did run into one small problem today though.  If you destroy an account with Devise, it tells the ORM to destroy the object first and then logout.  However, when Devise/Warden  logs out, it tries to write some data to the object.  The problem is that whenever MongoModel destroys an object, it freezes it afterwards.  So an exception occurs whenever it tries to logout and write data to that frozen object.  

To solve this, you can roll your own controller and inherit the Devise registration controller.  Just copy the code from the destroy function from Devise and make sure to call the logouts before you destroy the object.  

I've forked the gist and added the modifications pertaining to this problem here: https://gist.github.com/williamgkzhang/5817457

------------------------------------------------
William "G.K." Zhang
william...@gmail.com
infinit...@gmail.com



--
You received this message because you are subscribed to a topic in the Google Groups "MongoModel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongomodel/1fR7gvwECCc/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to mongomodel+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages