User
-
Toggle commit list
-
-
-
-
-
157 157 .form-control { 158 158 color: $danger; 159 159 } 160 } 161 162 .alert-error { 163 background-color: #f2dede; -
MasterEdited by Thanh Hung Pham
@phuongnhm mấy cái mã màu này em dùng lại nhiều. em khai báo biến để dùng lại nha.
Anh thấy class
.alert-errorvs.alert-alertgiống nhau mà. Em có thể define
.alert-error .alert-alert { background-color: #f2dede; border-color: #eed3d7; color: #b94a48; text-align: left; }- Tương tự
.alert-successvs.alert-notice
-
-
-
-
13 13 body.bg-light 14 14 = render 'layouts/header' 15 15 .container 16 / p.notice= notice -
Master
@phuongnhm code không dùng xóa nha em
-
-
-
1 class AuthenticatableRegisterableTrackableConfirmableToUser < ActiveRecord::Migration[6.1] 2 def change 3 change_table :users do |t| 4 # Database authenticatable 5 # t.string :email#, null: false, default: "" 6 t.string :encrypted_password, null: false, default: "" 7 8 ## Recoverable 9 t.string :reset_password_token 10 t.datetime :reset_password_sent_at 11 12 ## Rememberable 13 t.datetime :remember_created_at 14 15 ## Trackable 16 t.integer :sign_in_count, default: 0, null: false -
Master
@phuongnhm Mình có cần chức năng
Trackablekhông em? không cần implement hết của devise vào. -
-
-
-
8 8 get 'apply', to: 'apply_jobs#new' 9 9 post 'confirm', to: 'apply_jobs#confirm' 10 10 post 'done', to: 'apply_jobs#done' 11 devise_for :users, skip: %i[sessions registrations passwords], controllers: { confirmations: 'users/confirmations' } 12 resources :users, only: :show -
Master
@phuongnhm 2 paths này có vẻ giống nhau?
resources :users, only: :show get '/my', to: 'users#show' -
-
-
Toggle commit list
-
app/assets/stylesheets/flash.scss 0 → 100644
1 $background-error-alert-color:#f2dede; -
Master
@phuongnhm Sửa lại tên file hợp lý hơn nha em. File này mình chỉ lưu colors cho cả project luôn, nên đặt
colors.scsschẳng hạn -
-
-
162 } 163 164 .alert-error, .alert-alert { 165 background-color: $background-error-alert-color; 166 border-color: $border-error-alert-color; 167 color: $error-alert-color; 168 text-align: left; 169 } 170 171 .alert-success { -
MasterEdited by Thanh Hung Pham
@phuongnhm Còn 2 class này nữa em? Nội dung nó giống nhau kìa.
.alert-successvs.alert-notice -
-
-
1 1 class User < ApplicationRecord 2 has_one_attached :cv 2 3 has_many :apply_jobs, dependent: :destroy 3 4 has_many :favorite_jobs, dependent: :destroy 4 5 has_many :history_jobs, dependent: :destroy 5 end 6 devise :database_authenticatable, :registerable, 7 :recoverable, :rememberable, :validatable, 8 :confirmable 9 validates :name, length: { maximum: 200 } 10 validates :email, length: { maximum: 200 }, uniqueness: true -
Master
@phuongnhm Validate thêm email format nữa em. Giống bên Apply Job á
-
-
-
app/views/users/registrations/new.html.slim 0 → 100644
1 h2.p-3.text-center 2 | Register 3 .row 4 .col-md-6.offset-md-3.form-apply 5 = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| 6 = render 'shared/error_messages', object: resource 7 .card 8 .card-body 9 .field 10 = f.label :name, "Full Name" 11 br 12 = f.text_field :name, required: true, length: { maximum: 200 }, class: 'form-control' 13 .field 14 = f.label :email 15 br 16 = f.email_field :email, required: true, length: { maximum: 200 }, autofocus: true, autocomplete: "email", class: 'form-control' -
MasterEdited by Thanh Hung Pham
@phuongnhm em để thuộc tính
autofocus: trueởemailkhông hợp lý nha. Email nằm sauFull Namemà. Lúc mới vào form phải focus vàoFull Namechứ
-
-
-
-
Toggle commit list
-
merged
Toggle commit list

