Ferulic acid inhibits the transition of amyloid-β42 monomers to oligomers but accelerates the transition from oligomers to fibrils.