aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/algebra/extensions/hash.rb
blob: 05c15e7ebe62aa9ff0e52a2ed619aae22823d411 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
module Arel
  module HashExtensions
    def bind(relation)
      inject({}) do |bound, (key, value)|
        bound.merge(key.bind(relation) => value.bind(relation))
      end
    end
    
    Hash.send(:include, self)
  end
end