Commit 74cb245e by Hoang Nam Nguyen

files

parent 972348f5
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
include SessionsHelper
# include AppliesHelper
end
module AppliesHelper
# def apply_job(user_apply)
# apply[:user_apply_id] = user_apply.id
# binding.pry
# end
# def current_apply_job
# @current_apply_job ||= Apply.find_by(id: apply[:user_apply_id])
# end
# def applied_job?
# !current_apply_job.job_id.nil?
# end
end
module SessionsHelper
module SessionsHelper
def log_in(user)
session[:user_id] = user.id
end
......
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance_tag|
html_tag
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20171002022713) do
ActiveRecord::Schema.define(version: 20171004020516) do
create_table "add_cv_to_users", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
t.string "cv"
......@@ -23,6 +23,8 @@ ActiveRecord::Schema.define(version: 20171002022713) do
t.string "email"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "job_id"
t.integer "user_id"
end
create_table "cities", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
......
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