Added "devise" for authentication.
This commit is contained in:
parent
e6a0f15340
commit
35eb83448e
11 changed files with 410 additions and 30 deletions
6
app/views/layouts/_user_widget.slim
Normal file
6
app/views/layouts/_user_widget.slim
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
- if user_signed_in?
|
||||
p Welcome #{current_user.email}
|
||||
= link_to 'Logged In [click to logout]', destroy_user_session_path, :method => :delete
|
||||
- else
|
||||
p You are not signed in.
|
||||
= link_to 'Login', new_user_session_path
|
||||
|
|
@ -16,6 +16,7 @@ html
|
|||
// TODO: move topbar somewhere else than packages
|
||||
= render 'layouts/topbar'
|
||||
#messages
|
||||
= render 'layouts/user_widget'
|
||||
= render 'layouts/messages'
|
||||
#content
|
||||
= yield
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue