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: application_helper.rb
    path of file: ./repos/qaror/app/helpers
    
    the code of the file until where you have to start completion: module ApplicationHelper

  def title(t)
    content_for(:title) { saniti
    
  def field_messages_for(model, attribute=nil)
    if model && attribute
      err = model.errors[attribute]
      err = err.first if err.is_a?(Array)
    else
      err = model.errors.full_messages.first
    end