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/baremetrics-v1/app/helpers
    
    the code of the file until where you have to start completion: module ApplicationHelper
  def avatar_url(email, size = 100)
    gravatar_id = Digest::MD5.hexdigest(email.downcase
    
  def previous_months(number = 5)
    today = Date.today.beginning_of_month
    date_from  = today - number.months
    date_to = today
    date_range = date_from..date_to

    date_months = date_range.map {|d| Date.new(d.year, d.month, 1) }.uniq
    date_months.map {|d| d.strftime "%Y-%m-%d" }
  end