solving bug 1451

Signed-off-by: Arpit Goyal <agmps17@gmail.com>
Merge pull request #77 from agmps17/rails-4

solving bug 1451