You should add spaces: `User.where('type = ?', 'Users::Owner')`