-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
Description
This is the breadcrumb I get while using Draper decorator with delegate_all option:

ActiveAdmin can not look up the display method name correctly here:
def display_name_method_for(resource)
@@display_name_methods_cache ||= {}
@@display_name_methods_cache[resource.class] ||= begin
methods = active_admin_application.display_name_methods - association_methods_for(resource)
method = methods.detect{ |method| resource.respond_to? method }
if method != :to_s || resource.method(method).source_location
method
else
DISPLAY_NAME_FALLBACK
end
end
endMy decorator instance does not respond to any other than to_s methods, as the model does. In this case it is supposed to use the fallback, but the problem is that decorator to_s method got a source location: ["~/.rvm/gems/ruby-2.1.5/gems/draper-2.1.0/lib/draper/delegation.rb", 10].