Trying to get authlogic running
This commit is contained in:
parent
06f09c0486
commit
737ff62cfc
23 changed files with 306 additions and 4 deletions
6
app/views/shared/_error_messages.slim
Normal file
6
app/views/shared/_error_messages.slim
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
- if target.errors.any?
|
||||
div id="errorExplanation"
|
||||
h2 Errors
|
||||
ul
|
||||
- target.errors.full_messages.each do |msg|
|
||||
li = msg
|
||||
15
app/views/user_sessions/new.slim
Normal file
15
app/views/user_sessions/new.slim
Normal 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"
|
||||
20
app/views/users/_form.slim
Normal file
20
app/views/users/_form.slim
Normal 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
28
app/views/users/show.slim
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue