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

Version Path
rails_admin-3.3.0 lib/rails_admin/config/proxyable.rb
rails_admin-3.2.1 lib/rails_admin/config/proxyable.rb
rails_admin-3.2.0 lib/rails_admin/config/proxyable.rb
rails_admin-3.2.0.rc lib/rails_admin/config/proxyable.rb
rails_admin-3.2.0.beta lib/rails_admin/config/proxyable.rb
rails_admin-3.1.4 lib/rails_admin/config/proxyable.rb
rails_admin-3.1.3 lib/rails_admin/config/proxyable.rb
rails_admin-3.1.2 lib/rails_admin/config/proxyable.rb
rails_admin-3.1.1 lib/rails_admin/config/proxyable.rb
rails_admin-3.1.0 lib/rails_admin/config/proxyable.rb
rails_admin-3.1.0.rc2 lib/rails_admin/config/proxyable.rb
rails_admin-3.1.0.rc lib/rails_admin/config/proxyable.rb
rails_admin-3.1.0.beta lib/rails_admin/config/proxyable.rb