Sha256: 463ced067d856f22ad535f0644643a33d0427b10e5db0b2d5c717fb827263083
Contents?: true
Size: 671 Bytes
Versions: 13
Compression:
Stored size: 671 Bytes
Contents
# frozen_string_literal: true 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
13 entries across 13 versions & 1 rubygems