app/models/application_record.rb
def to_s

    if respond_to?( :name )

      name

    elsif respond_to?( :title )

      title

    else

      "#{self.model_name.human} ##{id}"

    end

  end
# Returns a prinable name for this model instance
Returns a prinable name for this model instance
Returns a prinable name for this model instance
def to_s
    if respond_to?( :name )
      name
    elsif respond_to?( :title )
      title
    else
      "#{self.model_name.human} ##{id}"
    end
  end
def to_s if respond_to? ( :name ) name elsif respond_to? ( :title ) title else "#{self.model_name.human} ##{id}" end end
Returns a prinable name for this model instance
Returns a prinable name for this model instance