supporting rails3 and rails4 in this release