def find(*args)
      id = args.first
      return super if args.count != 1 || id.unfriendly_id?
      first_by_friendly_id(id).tap {|result| return result unless result.nil?}
      return super if potential_primary_key?(id)
      raise_not_found_exception id
      
    end
def find(*args)
      id = args.first
      return super if args.count != 1 || id.unfriendly_id?
      first_by_friendly_id(id).tap {|result| return result unless result.nil?}
      return super if potential_primary_key?(id)
      raise_not_found_exception id
      
    end
Finds a record using the given id.

 If the id is "unfriendly", it will call the original find method.
 If the id is a numeric string like '123' it will first look for a friendly
 id matching '123' and then fall back to looking for a record with the
 numeric id '123'.

 Since FriendlyId 5.0, if the id is a nonnumeric string like '123-foo' it
 will *only* search by friendly id and not fall back to the regular find
 method.

 If you want to search only by the friendly id, use {#find_by_friendly_id}.
 @raise ActiveRecord::RecordNotFound