add example for rails4 and updated doc