diff options
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/arel-workaround.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/config/initializers/arel-workaround.rb b/config/initializers/arel-workaround.rb new file mode 100644 index 0000000..67f99f2 --- /dev/null +++ b/config/initializers/arel-workaround.rb @@ -0,0 +1,17 @@ +# Workaround to get Arel to work with newer versions of ruby +# from: https://stackoverflow.com/a/44286212 +module Arel + module Visitors + class DepthFirst < Arel::Visitors::Visitor + alias :visit_Integer :terminal + end + + class Dot < Arel::Visitors::Visitor + alias :visit_Integer :visit_String + end + + class ToSql < Arel::Visitors::Visitor + alias :visit_Integer :literal + end + end +end |