Trying to get authlogic running

This commit is contained in:
Christoph Haas 2015-07-13 18:42:36 +02:00
parent 06f09c0486
commit 737ff62cfc
23 changed files with 306 additions and 4 deletions

View file

@ -0,0 +1,6 @@
- if target.errors.any?
div id="errorExplanation"
h2 Errors
ul
- target.errors.full_messages.each do |msg|
li = msg

View file

@ -0,0 +1,15 @@
- raise @user_session
- form_for @user_session, :as => :user_session, :url => { :action => "create" } do |f|
= render "shared/error_messages", :target => @user_session
= f.label :email
br
= f.text_field :email
br
= f.label :password
br
= f.password_field :password
br
= f.check_box :remember_me
= f.label :remember_me
br
= f.submit "Login"

View file

@ -0,0 +1,20 @@
= render "shared/error_messages", :target => @user
p
= form.label :name %
br
= form.text_field :name
p
= form.label :email
br
= form.text_field :email
p
= form.label :password, form.object.new_record? ? nil : "Change password"
br
= form.password_field :password
p
= form.label :password_confirmation
br
= form.password_field :password_confirmation
= link_to 'Edit Account', edit_account_path

28
app/views/users/show.slim Normal file
View file

@ -0,0 +1,28 @@
p
b Email:
=h @user.email
p
b Login count:
=h @user.login_count
p
b Last request at:
=h @user.last_request_at
p
b Last login at:
=h @user.last_login_at
p
b Current login at:
=h @user.current_login_at
p
b Last login ip:
=h @user.last_login_ip
p
b Current login ip:
=h @user.current_login_ip