Blog Posts

Simple user activation with Sorcery gem

Disclaimer: In the following app, we have split the user model into three entities: Authentication (main model, storing all the neccessary data for users of any type), User (type of an user that can access internal app functions, such as article creation, category management etc.) and Member (type of an user that can only access external app functions, such as adding items to wishlists etc.). During the course of the article you may as well substitute every instance of these with old plain "User". 

First of all, we have to prepare our model for storing neccessary params enabling Sorcery to do its sorceries