Fixed belongs_to/has_many record where conditions to parse placeholders