Stefan Dabizljevic

Joined

120 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in How can i tell to devise to look at some other views?

Hey i have some problem with devise. I already created devise model for User and after that i run command rails g devise:views without user at the and. And now i decided that i must to have couple more devise model for authenticating and i create one for customer and than i run rails g devise:views customers and now i have views for customers. But every time when i try customers/sign_in this give me error because he immediatey render view from devise/session/new folder. which is for first model(User). How i can tell him when i'm go to customers/sign_in he should to render customer/session/new.html.erb? If somebody had some similar problem pls help:)
Tnx in advance!

Posted in How i can do multiple login with devise?

Hm i will try to do something like this: I will create new rails devise for manager than i will make association between manager and company has_one. But from this point how i can connect login for manager and admin in the same form on the site? And how i can allow admin to create manager but without devise_invitable just like normal, i have some list of managers where i can create, update, delete manager, and than when i'm creating new company i will have select control to choose manager for that company. What you mean, is this possible to do this on this way?

Posted in How i can do multiple login with devise?

Hey Chris now working fine, i was a little bit confused when i came here again and looked and big form for comment :D
Hey i thought i could use pundit for authorization and already i added role column in my user table and it working fine. But my problem here is how i can with user which have role :admin create another user which have role :manager for example and than that user can be logged in into my system and have certain permission?

Posted in How i can do multiple login with devise?

Hi everybody temporary i'm working on some rails project where i have one super admin which can create company, employee, resources also he can to add employee in the some company employee can to have many resources etc. The problem which i have here is: How i can create manager for each Company separately, super admin should to have ability to create manager for company. And than when manager going to do login he should just have information about his company. What is the best way for this if somebody already had experience with something like this would be great:) Tnx in advance!