Replaced find_by with where
Merge pull request #8 from dahal/Activerecord/Refactor

Replaced find_by with where