lib/arel/middleware/chain.rb in arel_toolkit-0.3.0 vs lib/arel/middleware/chain.rb in arel_toolkit-0.4.0

- old
+ new

@@ -12,11 +12,11 @@ result = Arel.sql_to_arel(sql, binds: binds) updated_context = context.merge(original_sql: sql) internal_middleware.each do |middleware_item| result = result.map do |arel| - middleware_item.call(arel, updated_context) + middleware_item.call(arel, updated_context.dup) end end result.to_sql end @@ -85,13 +85,9 @@ previous_chain = Middleware.current_chain Arel::Middleware.current_chain = new_chain yield block ensure Arel::Middleware.current_chain = previous_chain - end - - def current_chain - Arel::Middleware.current_chain end end end end