Fixing where call to be more railsy