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: memberable.rb
    path of file: ./repos/bluedoc/app/models/concerns
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Memberable
  extend ActiveSupport::Concern

  included do

    
  def add_member(user, role)
    return false if user.blank?
    return false unless user.user?
    members.create!(user: user, subject: self, role: role)
  rescue ActiveRecord::RecordNotUnique
    update_member(user, role)
    members.where(user: user, subject: self).first
  end