Manage roles with a roles model not with a model for every role, it
creates a lot of problems later on.
Ok so you mean the Roles model replaced the Users and Admins model like
this…
Roles
id
email
password
role (admin, user)
Or so you mean a Users model that connects to a Roles model like this…
User
id
email
password
roles_id
Roles
id
title
use this and set the layout based on the devise_scope (the example is
based
on the controllers)layout :layout_by_resource
def layout_by_resource
if devise_controller?
“layout_name_for_devise”
else
“application”
end
end
Yes, thanks, I also found more information here:
http://groups.google.com/group/plataformatec-devise/browse_thread/thread/80306c96985feca5/d400da1d904d52ee?lnk=gst&q=layout#d400da1d904d52ee