Closed mnquintana closed 9 years ago
The shifts_between method of location model is broken somehow and this causes the error
Shift.where('active is true') # Correct syntax
Shift.where('active is ?', true) # WRONG! It gets translated to FROM `shifts` WHERE (active IS 1)
Shift.where('active = ?', true) # The right way to pass in the value with Active Record Query Interface
# However:
Shift.where('active is ?', nil) # This works
Shift.where('active = ?', nil) # This works too
# So passing in NULL value works with both syntaxes
Location::shifts_between
is the only place where this incorrect syntax appears
Trying to access /public_view returns this error:
MySQL syntax error? Oops. This looks like it might be a problem deeper than public_view - we should investigate.