lib/avo/base_resource.rb in avo-2.18.0 vs lib/avo/base_resource.rb in avo-2.18.1.pre.1.eagerloaddirs

- old
+ new

@@ -47,10 +47,11 @@ class_attribute :after_create_path, default: :show class_attribute :after_update_path, default: :show class_attribute :record_selector, default: true class_attribute :keep_filters_panel_open, default: false class_attribute :extra_params + class_attribute :link_to_child_resource, default: false class << self delegate :t, to: ::I18n delegate :context, to: ::Avo::App @@ -420,13 +421,11 @@ rescue nil end def label - label_field.value || model_title - rescue - model_title + label_field&.value || model_title end def avatar_field get_field_definitions.find do |field| field.as_avatar.present? @@ -458,12 +457,10 @@ rescue nil end def description - description_field.value - rescue - nil + description_field&.value end def form_scope model_class.base_class.to_s.underscore.downcase end