The arel_extensions
gem has a couple of bugs...
DateSub
doesn't work:
(table[:column] - 10.hours).to_sql
# => NoMethodError: undefined method `to_sql' for nil:NilClass
- For MySQL,
DateAdd
generates a double-minus when given a negative duration:
(table[:column] + -10.hours).to_sql
# => DATE_ADD(`tmp_modules_fbt_travel_diaries`.`created_at`, INTERVAL --36000 second)
PR to fix this one: Faveod/arel-extensions#5