use rails directly