Method: ActiveAdmin::ViewHelpers::DisplayHelper#format_attribute
- Defined in:
- lib/active_admin/view_helpers/display_helper.rb
#format_attribute(resource, attr) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/active_admin/view_helpers/display_helper.rb', line 43 def format_attribute(resource, attr) value = find_value resource, attr if value.is_a?(Arbo::Element) value elsif boolean_attr?(resource, attr, value) Arbo::Context.new { status_tag value } else pretty_format value end end |