end of day commit
This commit is contained in:
@@ -1,41 +1,42 @@
|
||||
= form_for @user, html: {class: 'form-horizontal' } do |f|
|
||||
.control-group
|
||||
= render 'error_messages', target: @user
|
||||
.control-group class=(@user.errors[:email].any? ? 'error' : nil)
|
||||
= f.label :email, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :email, class: 'text_field'
|
||||
.control-group
|
||||
.control-group class=(@user.errors[:encrypted_password].any? ? 'error' : nil)
|
||||
= f.label :encrypted_password, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :encrypted_password, class: 'text_field'
|
||||
.control-group
|
||||
.control-group class=(@user.errors[:remember_token].any? ? 'error' : nil)
|
||||
= f.label :remember_token, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :remember_token, class: 'text_field'
|
||||
.control-group
|
||||
.control-group class=(@user.errors[:remember_created_at].any? ? 'error' : nil)
|
||||
= f.label :remember_created_at, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :remember_created_at, class: 'text_field'
|
||||
.control-group
|
||||
.control-group class=(@user.errors[:reset_password_token].any? ? 'error' : nil)
|
||||
= f.label :reset_password_token, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :reset_password_token, class: 'text_field'
|
||||
.control-group
|
||||
.control-group class=(@user.errors[:sign_in_count].any? ? 'error' : nil)
|
||||
= f.label :sign_in_count, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :sign_in_count, class: 'text_field'
|
||||
.control-group
|
||||
.control-group class=(@user.errors[:current_sign_in_at].any? ? 'error' : nil)
|
||||
= f.label :current_sign_in_at, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :current_sign_in_at, class: 'text_field'
|
||||
.control-group
|
||||
.control-group class=(@user.errors[:last_sign_in_at].any? ? 'error' : nil)
|
||||
= f.label :last_sign_in_at, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :last_sign_in_at, class: 'text_field'
|
||||
.control-group
|
||||
.control-group class=(@user.errors[:current_sign_in_ip].any? ? 'error' : nil)
|
||||
= f.label :current_sign_in_ip, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :current_sign_in_ip, class: 'text_field'
|
||||
.control-group
|
||||
.control-group class=(@user.errors[:last_sign_in_ip].any? ? 'error' : nil)
|
||||
= f.label :last_sign_in_ip, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :last_sign_in_ip, class: 'text_field'
|
||||
|
||||
@@ -1,38 +1,22 @@
|
||||
- model_class = User
|
||||
div class="page-header"= title :index, model_class
|
||||
table class="table table-striped"
|
||||
thead
|
||||
tr
|
||||
th= model_class.human_attribute_name(:email)
|
||||
th= model_class.human_attribute_name(:encrypted_password)
|
||||
th= model_class.human_attribute_name(:remember_token)
|
||||
th= model_class.human_attribute_name(:remember_created_at)
|
||||
th= model_class.human_attribute_name(:reset_password_token)
|
||||
th= model_class.human_attribute_name(:sign_in_count)
|
||||
th= model_class.human_attribute_name(:current_sign_in_at)
|
||||
th= model_class.human_attribute_name(:last_sign_in_at)
|
||||
th= model_class.human_attribute_name(:current_sign_in_ip)
|
||||
th= model_class.human_attribute_name(:last_sign_in_ip)
|
||||
th= model_class.human_attribute_name(:created_at)
|
||||
th=t 'helpers.actions'
|
||||
tbody
|
||||
- @users.each do |user|
|
||||
div.page-header= title :index, model_class
|
||||
- if @users.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr
|
||||
td= link_to user.email, user
|
||||
td= user.encrypted_password
|
||||
td= user.remember_token
|
||||
td= user.remember_created_at
|
||||
td= user.reset_password_token
|
||||
td= user.sign_in_count
|
||||
td= user.current_sign_in_at
|
||||
td= user.last_sign_in_at
|
||||
td= user.current_sign_in_ip
|
||||
td= user.last_sign_in_ip
|
||||
td=l user.created_at, format: :short
|
||||
td
|
||||
= link_to t('helpers.links.edit'), [:edit, user], class: 'btn btn-mini'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), user, method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
||||
|
||||
th= model_class.human_attribute_name(:email)
|
||||
th= model_class.human_attribute_name(:created_at)
|
||||
th=t 'helpers.actions'
|
||||
tbody
|
||||
- @users.each do |user|
|
||||
tr
|
||||
td= link_to user.email, user
|
||||
td=l user.created_at, format: :short
|
||||
td
|
||||
= link_to t('helpers.links.edit'), [:edit, user], class: 'btn btn-mini'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), user, method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
||||
- else
|
||||
= no_content_given model_class
|
||||
= link_to t("helpers.links.new"), new_user_path, class: 'btn btn-primary'
|
||||
|
||||
|
||||
@@ -1,27 +1,26 @@
|
||||
- model_class = User
|
||||
.page-header
|
||||
= title :show, @user
|
||||
.page-header= title :show, @user
|
||||
|
||||
dl.dl-horizontal.show-list
|
||||
dt= model_class.human_attribute_name(:email) + ':'
|
||||
dt= model_class.human_attribute_name(:email)
|
||||
dd= @user.email
|
||||
dt= model_class.human_attribute_name(:encrypted_password) + ':'
|
||||
dt= model_class.human_attribute_name(:encrypted_password)
|
||||
dd= @user.encrypted_password
|
||||
dt= model_class.human_attribute_name(:remember_token) + ':'
|
||||
dt= model_class.human_attribute_name(:remember_token)
|
||||
dd= @user.remember_token
|
||||
dt= model_class.human_attribute_name(:remember_created_at) + ':'
|
||||
dt= model_class.human_attribute_name(:remember_created_at)
|
||||
dd= @user.remember_created_at
|
||||
dt= model_class.human_attribute_name(:reset_password_token) + ':'
|
||||
dt= model_class.human_attribute_name(:reset_password_token)
|
||||
dd= @user.reset_password_token
|
||||
dt= model_class.human_attribute_name(:sign_in_count) + ':'
|
||||
dt= model_class.human_attribute_name(:sign_in_count)
|
||||
dd= @user.sign_in_count
|
||||
dt= model_class.human_attribute_name(:current_sign_in_at) + ':'
|
||||
dt= model_class.human_attribute_name(:current_sign_in_at)
|
||||
dd= @user.current_sign_in_at
|
||||
dt= model_class.human_attribute_name(:last_sign_in_at) + ':'
|
||||
dt= model_class.human_attribute_name(:last_sign_in_at)
|
||||
dd= @user.last_sign_in_at
|
||||
dt= model_class.human_attribute_name(:current_sign_in_ip) + ':'
|
||||
dt= model_class.human_attribute_name(:current_sign_in_ip)
|
||||
dd= @user.current_sign_in_ip
|
||||
dt= model_class.human_attribute_name(:last_sign_in_ip) + ':'
|
||||
dt= model_class.human_attribute_name(:last_sign_in_ip)
|
||||
dd= @user.last_sign_in_ip
|
||||
|
||||
.form-actions
|
||||
|
||||
Reference in New Issue
Block a user