The perfect way I had brewed ale (5)
'the perfect' is the definition.
'i had brewed ale' is the wordplay.
'i had' becomes 'id' (I'd).
'brewed' indicates anagramming the letters.
'ale' is an anagram of 'eal'.
'way' acts as a link.
This may not be correct. It may belong to another bit of the clue.
Can you help me to learn more?
(Other definitions for ideal that I've seen before include "Conceptual", "An - - Husband (Wilde)", "Best possible", "Model of excellence (5).", "Optimum".)