lib/avo/base_resource.rb in avo-2.11.2.pre.3 vs lib/avo/base_resource.rb in avo-2.11.3.pre.1

- old
+ new

@@ -1,12 +1,12 @@ module Avo class BaseResource extend ActiveSupport::DescendantsTracker include ActionView::Helpers::UrlHelper - include Avo::Concerns::HasModel include Avo::Concerns::HasFields + include Avo::Concerns::HasEditableControls include Avo::Concerns::HasStimulusControllers include Avo::Concerns::ModelClassConstantized delegate :view_context, to: ::Avo::App delegate :current_user, to: ::Avo::App @@ -436,8 +436,12 @@ model_class.base_class.to_s.underscore.downcase end def ordering_host(**args) Avo::Hosts::Ordering.new resource: self, options: self.class.ordering, **args + end + + def has_model_id? + model.present? && model.id.present? end end end