Added devise migartions

This commit is contained in:
Priit Tark 2015-05-20 13:48:16 +03:00
parent 61cbc38a11
commit db4727b8f7
4 changed files with 38 additions and 15 deletions

View file

@ -8,6 +8,8 @@ class AdminUser < User
ROLES = %w(user customer_service admin)
devise :database_authenticatable, :rememberable, :trackable, :validatable, :lockable
def to_s
username
end

View file

@ -9,7 +9,7 @@
= err
%br
.row
.col-md-6
.col-md-8
.panel.panel-default
.panel-heading
%h3.panel-title= t(:general)
@ -18,21 +18,12 @@
%dt= t(:username)
%dd= @admin_user.username
%dt= t(:password)
%dd= @admin_user.password
%dt= t(:email)
%dd= @admin_user.email
%dt= t(:identity_code)
%dd= @admin_user.identity_code
.col-md-6
.panel.panel-default
.panel-heading
%h3.panel-title= t(:address)
.panel-body
%dl.dl-horizontal
%dt= t(:email)
%dd= @admin_user.email
%dt= t(:role)
- if @admin_user.roles
%dd= t(@admin_user.roles.first)