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: invitations_controller.rb
    path of file: ./repos/lobsters/app/controllers
    
    the code of the file until where you have to start completion: # typed: false

class In
    
  def create_by_request
    if Rails.application.allow_invitation_requests?
      @invitation_request = InvitationRequest.new(
        params.require(:invitation_request).permit(:name, :email, :memo)
      )

      @invitation_request.ip_address = request.remote_ip

      if @invitation_request.save
        flash[:success] = "You have been e-mailed a confirmation to " <<
          params[:invitation_request][:email].to_s << "."
        redirect_to "/invitations/request"
      else
        render action: :build
      end