Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

RailsAdmin::Config::Proxyable::Proxy method_missing doesn't set @bindings #1223

christophermanning opened this Issue Jun 26, 2012 · 2 comments


None yet
2 participants

christophermanning commented Jun 26, 2012

proxy.rb#L30 doesn't actually set the @bindings instance variable on the object which causes it to look up the fields much more inefficiently than if @bindings were set. I was able to get it to set the @bindings correctly by changing L30 to @object.instance_variable_set("@bindings", @bindings.dup) (added dup to @bindings).

Additionally, proxy.rb#L28 creates a local variable, but proxy.rb#L33 references an instance variable. So L33 should be changed to a local variable.

ruby 1.9.3p194
rails_admin 0.0.4


mshibuya commented Jul 6, 2012

I'm sorry but I'm not so good at these meta-programming things, and I don't get the point about @bindings issue.
What does 'doesn't actually set' exactly mean?
And what part of RailsAdmin code is made to be much more inefficient?
Why is this fixed by adding dup?

It would be great if you could write specs for what you are attempting to fix 😃


mshibuya commented Feb 25, 2014

The second issue was fixed by 9a4d1ba.
Please reopen if any update exists with the first issue.

@mshibuya mshibuya closed this Feb 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment