course_memberships.auditing can't be NULL based on your migration. Also, this line is mixing SQL and Ruby. A verbatim rewrite would look like this:

```ruby
where("course_memberships.auditing = 'f' OR course_memberships.auditing IS NULL")
# OR
where('course_memberships.auditing = ? OR course_memberships.auditing IS NULL', false)
```
The IS NULL clause is unnecessary though, so you can just check for false.