Sha256: a7c50c91e4f46660ecb9d09c463ff17efa220ee978906e365c053a0246d85006
Contents?: true
Size: 640 Bytes
Versions: 18
Compression:
Stored size: 640 Bytes
Contents
require 'rails_admin/config/proxyable/proxy' module RailsAdmin module Config module Proxyable def bindings Thread.current[:rails_admin_bindings] ||= {} Thread.current[:rails_admin_bindings][self] end def bindings=(new_bindings) Thread.current[:rails_admin_bindings] ||= {} if new_bindings.nil? Thread.current[:rails_admin_bindings].delete(self) else Thread.current[:rails_admin_bindings][self] = new_bindings end end def with(bindings = {}) RailsAdmin::Config::Proxyable::Proxy.new(self, bindings) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems