% case object%> <% when PagePart %> <% object_name = 'page_part' %> <% field_name = 'widget_field' %> <% reload_rel = reload_after_widget_field_changed_admin_page_part_path %> <% when Page %> <% object_name = 'page' %> <% field_name = 'frontend_field' %> <% reload_rel = reload_after_widget_field_changed_admin_pages_path %> <% end %>