doc rails4 engine mechanism