app/controllers/application_controller.rb
# find furrent user by ID from decoded token
find furrent user by ID from decoded token
find furrent user by ID from decoded token
def current_user
        if decoded_token  
            user_id = decoded_token[0]['user_id']
            @user = User.find_by(id: user_id)
        end
    end
def current_user if decoded_token user_id = decoded_token [ 0 ] [ 'user_id' ] @user = User . find_by ( id : user_id ) end end
find furrent user by ID from decoded token
find furrent user by ID from decoded token