Commit 8ca02714 by Thanh Hung Pham

Merge branch 'apply-confirm-done-page' into 'master'

apply confirm page

See merge request !7
parents b3617479 7c86d4ed
Pipeline #1391 failed with stages
in 0 seconds
...@@ -38,3 +38,4 @@ ...@@ -38,3 +38,4 @@
/yarn-error.log /yarn-error.log
yarn-debug.log* yarn-debug.log*
.yarn-integrity .yarn-integrity
/config/credentials.yml.enc
\ No newline at end of file
...@@ -11,6 +11,8 @@ gem 'slim-rails' ...@@ -11,6 +11,8 @@ gem 'slim-rails'
gem 'kaminari', '~> 1.2', '>= 1.2.1' gem 'kaminari', '~> 1.2', '>= 1.2.1'
gem 'friendly_id', '~> 5.4', '>= 5.4.2' gem 'friendly_id', '~> 5.4', '>= 5.4.2'
gem 'babosa' gem 'babosa'
gem 'active_storage_validations'
gem 'mini_magick', '>= 4.9.5'
# Use sqlite3 as the database for Active Record # Use sqlite3 as the database for Active Record
gem 'mysql2', '~> 0.5.3' gem 'mysql2', '~> 0.5.3'
# Use Puma as the app server # Use Puma as the app server
......
...@@ -39,6 +39,8 @@ GEM ...@@ -39,6 +39,8 @@ GEM
erubi (~> 1.4) erubi (~> 1.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_storage_validations (0.9.5)
rails (>= 5.2.0)
activejob (6.1.4) activejob (6.1.4)
activesupport (= 6.1.4) activesupport (= 6.1.4)
globalid (>= 0.3.6) globalid (>= 0.3.6)
...@@ -119,6 +121,7 @@ GEM ...@@ -119,6 +121,7 @@ GEM
mini_mime (>= 0.1.1) mini_mime (>= 0.1.1)
marcel (1.0.1) marcel (1.0.1)
method_source (1.0.0) method_source (1.0.0)
mini_magick (4.11.0)
mini_mime (1.1.0) mini_mime (1.1.0)
minitest (5.14.4) minitest (5.14.4)
msgpack (1.4.2) msgpack (1.4.2)
...@@ -234,6 +237,7 @@ PLATFORMS ...@@ -234,6 +237,7 @@ PLATFORMS
x86_64-linux x86_64-linux
DEPENDENCIES DEPENDENCIES
active_storage_validations
babosa babosa
bootsnap (>= 1.4.4) bootsnap (>= 1.4.4)
bootstrap (~> 5.0.1) bootstrap (~> 5.0.1)
...@@ -243,6 +247,7 @@ DEPENDENCIES ...@@ -243,6 +247,7 @@ DEPENDENCIES
jbuilder (~> 2.7) jbuilder (~> 2.7)
kaminari (~> 1.2, >= 1.2.1) kaminari (~> 1.2, >= 1.2.1)
listen (~> 3.3) listen (~> 3.3)
mini_magick (>= 4.9.5)
mysql2 (~> 0.5.3) mysql2 (~> 0.5.3)
nokogiri (~> 1.11, >= 1.11.7) nokogiri (~> 1.11, >= 1.11.7)
puma (~> 5.0) puma (~> 5.0)
......
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
padding-bottom: 10px; padding-bottom: 10px;
} }
footer {
min-height: 227px;
}
.navbar ul li a { .navbar ul li a {
color: #fff; color: #fff;
font-size: 18px; font-size: 18px;
...@@ -63,3 +67,87 @@ ...@@ -63,3 +67,87 @@
justify-content: center; justify-content: center;
} }
// ribbon
.ribbon {
width: 100%;
}
.progressbar {
counter-reset: step;
}
.progressbar li {
list-style-type:none;
float: left;
width: 33.33%;
position: relative;
text-align: center;
}
.progressbar li:before {
content : counter(step);
counter-increment: step;
width: 40px;
height: 40px;
line-height: 40px;
border: 2px solid #ddd;
display: block;
text-align: center;
margin: 0 auto 10px auto;
border-radius: 50%;
background-color: #fff;
}
.progressbar li:after {
content : '';
position:absolute;
width: 100%;
height: 3px;
line-height: 40px;
background-color: #ddd;
top: 15px;
left: -50%;
z-index: -1;
}
.progressbar li:first-child:after {
content: none;
}
.progressbar li.active {
color: blue;
}
.progressbar li.active:before {
border-color: blue;
}
.progressbar li.active + li:after {
background-color: blue;
}
// form
.btn-space {
margin-right: 10px;
}
.form-apply label {
margin: 8px 0;
font-size: 18px;
}
#error_explanation {
color: red;
ul {
color: red;
margin: 0 0 30px 0;
}
}
.field_with_errors {
.form-control {
color: $danger;
}
}
\ No newline at end of file
class ApplyJobsController < ApplicationController
def new
job = Job.find_by(id: params[:job_id])
return root_path unless job
@apply_job = if session[:apply_job].present?
ApplyJob.new(session[:apply_job])
else
ApplyJob.new
end
@apply_job.job_id = job.id
end
def confirm
@apply_job = ApplyJob.new(apply_params)
@apply_job.user_id = User.find_by(id: 1).id
if @apply_job.valid?
session[:apply_job] = @apply_job
render :confirm
else
render :new
end
end
def done
@apply_job = ApplyJob.new(apply_params)
@apply_job.user_id = User.find_by(id: 1).id
@job = Job.latest_jobs.find(apply_params[:job_id])
if @apply_job.save
ApplyJobMailer.with(apply_job: @apply_job, job: @job).create_apply.deliver_now
flash.now[:success] = 'You have applied successfully'
else
flash.now[:danger] = 'Please apply again'
redirect_to root_url
end
session[:apply_job] = nil
end
private
def apply_params
params.require(:apply_job).permit(:name, :email, :cv, :job_id)
end
end
...@@ -4,4 +4,14 @@ module ApplicationHelper ...@@ -4,4 +4,14 @@ module ApplicationHelper
input.strftime('%d/%m/%Y') input.strftime('%d/%m/%Y')
end end
def class_active(link_path)
return unless current_page?(link_path)
'active'
end
def current_page?(*paths)
paths.include?(request.path)
end
end end
class ApplicationMailer < ActionMailer::Base class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com' default from: 'info@venjob.com'
layout 'mailer' layout 'mailer'
end end
class ApplyJobMailer < ApplicationMailer
def create_apply
@apply_job = params[:apply_job]
@job = params[:job]
mail to: @apply_job.email, subject: 'CONFIRM INFORMATION'
end
end
class ApplyJob < ApplicationRecord class ApplyJob < ApplicationRecord
belongs_to :user belongs_to :user
belongs_to :job belongs_to :job
has_one_attached :cv
validates :name, presence: true, length: { maximum: 200 }
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
validates :email, presence: true, length: { maximum: 255 }, format: { with: VALID_EMAIL_REGEX }
validates :cv, presence: true, content_type: { in: 'application/pdf', message: 'must be a valid image format' },
size: { less_than: 5.megabytes, message: 'should be less than 5MB' }
end end
...@@ -4,8 +4,8 @@ class Industry < ApplicationRecord ...@@ -4,8 +4,8 @@ class Industry < ApplicationRecord
has_and_belongs_to_many :jobs has_and_belongs_to_many :jobs
LATEST_INDUSTRY_NUMBER = 9 LATEST_INDUSTRY_NUMBER = 9
scope :top_industries, -> { joins(:jobs).group(:name, :slug).order('count_all DESC').count.take(LATEST_INDUSTRY_NUMBER) } scope :top_industries, -> { group(:name, :slug).order('count_all DESC').count.take(LATEST_INDUSTRY_NUMBER) }
scope :industry_list, -> { joins(:jobs).group(:name, :slug).having('count_all >= ?', 1).order('count_all DESC').count } scope :industry_list, -> { group(:name, :slug).having('count_all >= ?', 1).order('count_all DESC').count }
def normalize_friendly_id(string) def normalize_friendly_id(string)
string.to_s.to_slug.normalize(transliterations: :vietnamese).to_s string.to_s.to_slug.normalize(transliterations: :vietnamese).to_s
......
...@@ -8,7 +8,7 @@ class Job < ApplicationRecord ...@@ -8,7 +8,7 @@ class Job < ApplicationRecord
has_and_belongs_to_many :industries has_and_belongs_to_many :industries
has_and_belongs_to_many :cities has_and_belongs_to_many :cities
LATEST_JOB_NUMBER = 5 LATEST_JOB_NUMBER = 5
scope :latest_jobs, -> { includes(:cities, :industries, :company).order('created_at DESC') } scope :latest_jobs, -> { includes(:cities, :company).order('created_at DESC') }
def normalize_friendly_id(string) def normalize_friendly_id(string)
string.to_s.to_slug.normalize(transliterations: :vietnamese).to_s string.to_s.to_slug.normalize(transliterations: :vietnamese).to_s
......
p
| Dear
= @apply_job.name
| ,
p
| Thank you for applied with VenJOB. Your applied job's information is as follow:
p
| Job title:
= @job.title
p
| Company:
= @job.company.name
p
| Location:
= @job.cities.map(&:name).uniq.join(' , ')
p
| Your submitted information:
p
| Full Name:
= @apply_job.name
p
| Email:
= @apply_job.email
p
| CV Link:
= url_for(@apply_job.cv)
p
| Best,
\ No newline at end of file
| Dear
= @apply_job.name
| ,
| Thank you for applied with VenJOB. Your applied job's information is as follow:
| Your submitted information:
| Job title:
= @job.title
| Company:
= @job.company.name
| Location:
= @job.cities.map(&:name).uniq.join(' , ')
| Full Name:
= @apply_job.name
| Email:
= @apply_job.email
| CV Link:
= @apply_job.cv
| Best,
\ No newline at end of file
.ribbon
ul.progressbar
li class="#{class_active(apply_path)}"
.span.indicator
.span.title Apply
li class="#{class_active(confirm_path)}"
.span.indicator
.span.title Confirm
li class="#{class_active(done_path)}"
.span.indicator
.span.title Done
\ No newline at end of file
= render 'ribbon'
h2.text-center
| CONFIRM INFORMATION
.col-md-6.offset-md-3.form-apply
= form_with(model: @apply_job, url: done_path, local: true) do |f|
= render 'shared/error_messages'
= f.hidden_field :job_id
= f.label :name
= f.text_field :name, required: true, disabled: true, length: { maximum: 200 },
placeholder: "Type name...", class: 'form-control'
= f.hidden_field :name
= f.label :email
= f.text_field :email, required: true, disabled: true, length: { maximum: 255 }, format: { with: ApplyJob::VALID_EMAIL_REGEX},
placeholder: "Type email...", class: 'form-control'
= f.hidden_field :email
p.my-1
= f.label :cv, "CV"
p
= f.file_field :cv, required: true, accept: "application/pdf", size: { less_than: 5.megabytes, message:"should be less than 5MB" }
.span.p-3.text-center
= link_to "Back", apply_path(job_id: @apply_job.job_id), class: "btn btn-primary btn-space"
= f.submit "Done", class: "btn btn-primary btn-space"
\ No newline at end of file
= render 'ribbon'
.container.py-5
h3.py-3.text-center
| Thank you for apply
p.p-3.text-center
= link_to "Back to TOP page", root_path, class: "btn btn-primary btn-lg"
\ No newline at end of file
= render 'ribbon'
h2.text-center.form-title
| APPLY INFORMATION
.col-md-6.offset-md-3.form-apply
= form_with(model: @apply_job, url: confirm_path, local: true) do |f|
= render 'shared/error_messages'
= f.hidden_field :job_id
= f.label :name
= f.text_field :name, required: true, length: { maximum: 200 }, placeholder: "Type name...", class: 'form-control'
= f.label :email
= f.text_field :email, required: true, length: { maximum: 255 }, format: { with: ApplyJob::VALID_EMAIL_REGEX}, placeholder: "Type email...", class: 'form-control'
p.my-1
= f.label :cv, "CV"
p
= f.file_field :cv, required: true, accept: "application/pdf", size: { less_than: 5.megabytes, message:"should be less than 5MB" }
.span.p-3.text-center
= f.submit "Confirm", class: "btn btn-primary"
\ No newline at end of file
...@@ -3,7 +3,7 @@ nav.breadcrumb[style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb"] ...@@ -3,7 +3,7 @@ nav.breadcrumb[style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb"]
li.breadcrumb-item li.breadcrumb-item
= link_to "Top", root_path = link_to "Top", root_path
li.breadcrumb-item li.breadcrumb-item
- @job.cities.each do |city| - @job.cities.each.uniq do |city|
= link_to city.name + ' ', city_slug_path(city.slug) = link_to city.name + ' ', city_slug_path(city.slug)
li.breadcrumb-item li.breadcrumb-item
- @job.industries.each do |industry| - @job.industries.each do |industry|
......
.search.p-3.offset-md-2 .search.p-3.offset-md-2
= form_with(url: '/jobs', method: 'get', local: true) do = form_with(url: '/jobs', local: true) do
= text_field_tag :search, params[:search], placeholder: "Search", class: "form" = text_field_tag :search, params[:search], placeholder: "Search", class: "form"
= submit_tag "Search", name: nil, class: 'btn-primary' = submit_tag "Search", name: nil, class: 'btn-primary'
\ No newline at end of file
...@@ -46,10 +46,10 @@ ...@@ -46,10 +46,10 @@
p.mb-2 p.mb-2
= @job.other_requirement = @job.other_requirement
.col-sm-2.p-3.apply-job .col-sm-2.p-3.apply-job
= link_to "Apply this Job", "#", class: "btn btn-outline-primary btn-lg" = link_to "Apply this Job", apply_path(job_id: @job.id), class: "btn btn-outline-primary btn-lg"
.row.bg-white.p-4 .row.bg-white.p-4
.col.text-end .col.text-end
= link_to "Apply this Job", "#", class: "btn btn-outline-primary btn-lg" = link_to "Apply this Job", apply_path(job_id: @job.id), class: "btn btn-outline-primary btn-lg"
.col .col
= link_to "Favourite", "#", class: "btn btn-outline-primary btn-lg" = link_to "Favourite", "#", class: "btn btn-outline-primary btn-lg"
...@@ -13,5 +13,7 @@ html ...@@ -13,5 +13,7 @@ html
body.bg-light body.bg-light
= render 'layouts/header' = render 'layouts/header'
.container .container
- flash.each do |key, value|
= content_tag(:div, value, class: "alert alert-#{key}")
= yield = yield
= render 'layouts/footer' = render 'layouts/footer'
- if @apply_job.errors.any?
#error_explanation
.alert.alert-danger
| The form contains
= pluralize(@apply_job.errors.count, "error")
| .
ul
- @apply_job.errors.full_messages.each do |msg|
li
= msg
\ No newline at end of file
DrY0/AhPzESn8oDFDPTUQsBNEvk49s13rSSpqNIGN57qdKMPNAsXwCKW3A/cAboje8Y5R0GxXkKFdKYWIK5ugq7ohO9d08CTuVeWhy4IATS1aJdy1GRYLg3F31k+X8Mtcf0J9mQmjBMLg9y0d69s6edaTpwtjvjkirXvbGuF2QxkWQv4vEXCqzCnQzrUbP2MIR8Oe4n0CfEZHeQVjY9tb2aFho+0hZosrSNzVVWnt4OGITjD6joHx31gJjshbWsSgumId0TkAdj2xBTUuMYwOk/21o7cBa974fzDuLuDjIZxm0joGOnsakj7j6db0xfkCG72dqXLOMIS2L6CH+skSHGMqWQEORMVm6qJsa9JyqYofIaFz4rCVqdrfG7p9GGBQHmxb4xuMFklfGLq3D9U9CMsY1/DRt7+JGky--sjw58TA1XGrY/KWE--lvwZbxtAhxp+E6KZw+vMjQ== LLXrsXgHj/eT4V86Yfq8vQXrQyf43GztPjNh2aNz2zWvALbtyk8p3TgWkoLHMa2Dza7h4LGEeju/9euFKpMOMjS3SjdTOrc2b45sKZzqjfNdc56gr0NxEjuptwzAcvPc+97lWKEncqq/mEdLlAJXgMGy99gr8hVwq5U+tPIg/Y3ftgic2bVrOPxey3uEQuOlsDVwdvRq71bTJyxPAtE/MEaXv11ni9aLkwjtTQNkhTP/6UDm2ReSsvFDNcecl/dMf7VikTDOq0I5hf/8JpmYyBsQnZwPHQxhYd9uq1TBTB/Ssse1YUq855mLWOIxZAFY7nwrQl3gyYBzq+kE6wOaaoHGXfe173/Qrz03VImtn7fIInT9GKA6EpOzdDZReEFwhokmzWmLPBfSww13WlaHm691CJKEp2nXOCIxbW4cMNucq9NAV63gFJMSHEA7zXfG9Cz64IGlIO5QVef9CdbV0PcWFGe6XXhT1TiBOh5P9cAcG9qZ2/qfndGWDOr1HViNgvjr+1Z3NwzkaMuy--5CuvR8xpXsWADso7--xRAO8W3HzhLCwCOYcvpx8g==
\ No newline at end of file \ No newline at end of file
...@@ -33,8 +33,19 @@ Rails.application.configure do ...@@ -33,8 +33,19 @@ Rails.application.configure do
# Store uploaded files on the local file system (see config/storage.yml for options). # Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local config.active_storage.service = :local
config.action_mailer.perform_deliveries = true
# Don't care if the mailer can't send. # Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false config.action_mailer.raise_delivery_errors = false
config.action_mailer.delivery_method = :smtp
config.action_mailer.default_url_options = { host: "localhost:3000" , protocol: "http"}
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'localhost:3000',
user_name: Rails.application.credentials.dig(:google_smtp, :email),
password: Rails.application.credentials.dig(:google_smtp, :password),
authentication: 'plain',
enable_starttls_auto: true }
config.action_mailer.perform_caching = false config.action_mailer.perform_caching = false
......
...@@ -40,6 +40,19 @@ Rails.application.configure do ...@@ -40,6 +40,19 @@ Rails.application.configure do
# Store uploaded files on the local file system (see config/storage.yml for options). # Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local config.active_storage.service = :local
config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.default_url_options = { host: "localhost:3000" , protocol: "http"}
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'localhost:3000',
user_name: Rails.application.credentials.dig(:google_smtp, :email),
password: Rails.application.credentials.dig(:google_smtp, :password),
authentication: 'plain',
enable_starttls_auto: true }
# Mount Action Cable outside main process or domain. # Mount Action Cable outside main process or domain.
# config.action_cable.mount_path = nil # config.action_cable.mount_path = nil
# config.action_cable.url = 'wss://example.com/cable' # config.action_cable.url = 'wss://example.com/cable'
...@@ -66,7 +79,7 @@ Rails.application.configure do ...@@ -66,7 +79,7 @@ Rails.application.configure do
# Ignore bad email addresses and do not raise email delivery errors. # Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false config.action_mailer.raise_delivery_errors = false
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found). # the I18n.default_locale when a translation cannot be found).
......
...@@ -5,4 +5,7 @@ Rails.application.routes.draw do ...@@ -5,4 +5,7 @@ Rails.application.routes.draw do
get 'jobs/city/:city_slug', to: 'jobs#index', as: 'city_slug' get 'jobs/city/:city_slug', to: 'jobs#index', as: 'city_slug'
get 'jobs/industry/:industry_slug', to: 'jobs#index', as: 'industry_slug' get 'jobs/industry/:industry_slug', to: 'jobs#index', as: 'industry_slug'
get 'detail/:job_slug', to: 'jobs#show', as: 'detail' get 'detail/:job_slug', to: 'jobs#show', as: 'detail'
get 'apply', to: 'apply_jobs#new'
post 'confirm', to: 'apply_jobs#confirm'
post 'done', to: 'apply_jobs#done'
end end
\ No newline at end of file
every 1.day, at: '08:00 am' do # every 1.day, at: '08:00 am' do
rake 'crawler:all' # rake 'crawler:all'
end # end
class AddNameEmailToApplyJobs < ActiveRecord::Migration[6.1]
def change
add_column :apply_jobs, :name, :string
add_column :apply_jobs, :email, :string
end
end
# This migration comes from active_storage (originally 20170806125915)
class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
def change
create_table :active_storage_blobs do |t|
t.string :key, null: false
t.string :filename, null: false
t.string :content_type
t.text :metadata
t.string :service_name, null: false
t.bigint :byte_size, null: false
t.string :checksum, null: false
t.datetime :created_at, null: false
t.index [ :key ], unique: true
end
create_table :active_storage_attachments do |t|
t.string :name, null: false
t.references :record, null: false, polymorphic: true, index: false
t.references :blob, null: false
t.datetime :created_at, null: false
t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true
t.foreign_key :active_storage_blobs, column: :blob_id
end
create_table :active_storage_variant_records do |t|
t.belongs_to :blob, null: false, index: false
t.string :variation_digest, null: false
t.index %i[ blob_id variation_digest ], name: "index_active_storage_variant_records_uniqueness", unique: true
t.foreign_key :active_storage_blobs, column: :blob_id
end
end
end
class RemoveCvFromApplyJobs < ActiveRecord::Migration[6.1]
def change
remove_column :apply_jobs, :cv
end
end
...@@ -10,14 +10,43 @@ ...@@ -10,14 +10,43 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_08_05_021856) do ActiveRecord::Schema.define(version: 2021_08_09_075523) do
create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
t.bigint "record_id", null: false
t.bigint "blob_id", null: false
t.datetime "created_at", null: false
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
end
create_table "active_storage_blobs", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "key", null: false
t.string "filename", null: false
t.string "content_type"
t.text "metadata"
t.string "service_name", null: false
t.bigint "byte_size", null: false
t.string "checksum", null: false
t.datetime "created_at", null: false
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
end
create_table "active_storage_variant_records", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.bigint "blob_id", null: false
t.string "variation_digest", null: false
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
end
create_table "apply_jobs", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "apply_jobs", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.bigint "user_id", null: false t.bigint "user_id", null: false
t.bigint "job_id", null: false t.bigint "job_id", null: false
t.binary "cv"
t.datetime "created_at", precision: 6, null: false t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false
t.string "name"
t.string "email"
t.index ["job_id"], name: "index_apply_jobs_on_job_id" t.index ["job_id"], name: "index_apply_jobs_on_job_id"
t.index ["user_id"], name: "index_apply_jobs_on_user_id" t.index ["user_id"], name: "index_apply_jobs_on_user_id"
end end
...@@ -138,6 +167,8 @@ ActiveRecord::Schema.define(version: 2021_08_05_021856) do ...@@ -138,6 +167,8 @@ ActiveRecord::Schema.define(version: 2021_08_05_021856) do
t.datetime "updated_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false
end end
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
add_foreign_key "apply_jobs", "jobs" add_foreign_key "apply_jobs", "jobs"
add_foreign_key "apply_jobs", "users" add_foreign_key "apply_jobs", "users"
add_foreign_key "cities", "regions" add_foreign_key "cities", "regions"
......
# Preview all emails at http://localhost:3000/rails/mailers/apply_job_mailer
class ApplyJobMailerPreview < ActionMailer::Preview
# Preview this email at http://localhost:3000/rails/mailers/apply_job_mailer/create_apply
def create_apply
ApplyJobMailer.create_apply
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment