You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: practices_controller.rb
    path of file: ./repos/bootcamp/app/controllers/mentor
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class Mentor::PracticesController < ApplicationController
  before_act
    
  def update
    @practice.last_updated_user = current_user
    if @practice.update(practice_params)
      ChatNotifier.message("プラクティス：「#{@practice.title}」を#{current_user.login_name}さんが編集しました。\r#{url_for(@practice)}")
      redirect_to @practice, notice: 'プラクティスを更新しました。'
    else
      render :edit
    end