Fix update info

parent 02e124be
Pipeline #913 failed with stages
in 0 seconds
class UsersController < ApplicationController
before_action :signed_in_user, only: [:update, :my_page, :my_info]
def my_page
@user = User.find(current_user.id)
@user = current_user
end
def my_info
@user = User.find(current_user.id)
@user = current_user
end
def update
@user = User.find(current_user.id)
@user = current_user
if BCrypt::Password.new(@user.password_digest) != change_password[:oldpassword]
flash.now[:danger] = 'Old Password is mismatch'
else
......
......@@ -21,7 +21,7 @@ module SessionsHelper
end
def sign_out
current_user.update_attribute(:remember_token, User.digest(User.new_remember_token))
# current_user.update_attribute(:remember_token, User.digest(User.new_remember_token))
cookies.delete(:remember_token)
self.current_user = nil
end
......
......@@ -58,7 +58,7 @@ class CSVImporter
description: description_job,
level: level,
salary: salary,
company_id: company_id)
company_id: company.id)
industry_name = row["category"]
industries_relationship = Industry.where(name: industry_name)
......
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