diff options
Diffstat (limited to 'config/initializers/arel_patch.rb')
| -rw-r--r-- | config/initializers/arel_patch.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/config/initializers/arel_patch.rb b/config/initializers/arel_patch.rb new file mode 100644 index 0000000..753a72b --- /dev/null +++ b/config/initializers/arel_patch.rb | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | require 'arel' | ||
| 2 | module Arel | ||
| 3 | module Visitors | ||
| 4 | [ToSql, DepthFirst].each do |visitor| | ||
| 5 | visitor.class_eval do | ||
| 6 | def visit_Integer(o, collector = nil) | ||
| 7 | collector ? collector << o.to_s : o.to_s | ||
| 8 | end | ||
| 9 | end | ||
| 10 | end | ||
| 11 | end | ||
| 12 | end | ||
