Method: ActiveAdmin::ViewHelpers::DisplayHelper#find_value
- Defined in:
- lib/active_admin/view_helpers/display_helper.rb
#find_value(resource, attr) ⇒ Object
55 56 57 58 59 60 61 62 63 |
# File 'lib/active_admin/view_helpers/display_helper.rb', line 55 def find_value(resource, attr) if attr.is_a? Proc attr.call resource elsif resource.respond_to? attr resource.public_send attr elsif resource.respond_to? :[] resource[attr] end end |