def data_name(data_token)
      return unless data_token # nil or false

      return data_token.values.first if data_token.is_a?(Hash) # @user => :user

      data = data_object(data_token)

      if is_collection?(data) # data is a collection
        object_name = collection_root_name if collection_root_name
        object_name ||= data.table_name if data.respond_to?(:table_name)

        if object_name.nil? && data.respond_to?(:first)
          first = data.first
          object_name = data_name(first).to_s.pluralize if first.present?
        end

        object_name ||= data_token if data_token.is_a?(Symbol)
        object_name
      elsif is_object?(data) # data is an object
        object_name = object_root_name if object_root_name
        object_name ||= data if data.is_a?(Symbol)
        object_name ||= collection_root_name.to_s.singularize if collection_root_name
        object_name ||= data.class.respond_to?(:model_name) ? data.class.model_name.element : data.class.to_s.downcase
        object_name
      else
        data_token
      end
    end
def data_name(data_token)
      return unless data_token # nil or false

      return data_token.values.first if data_token.is_a?(Hash) # @user => :user

      data = data_object(data_token)

      if is_collection?(data) # data is a collection
        object_name = collection_root_name if collection_root_name
        object_name ||= data.table_name if data.respond_to?(:table_name)

        if object_name.nil? && data.respond_to?(:first)
          first = data.first
          object_name = data_name(first).to_s.pluralize if first.present?
        end

        object_name ||= data_token if data_token.is_a?(Symbol)
        object_name
      elsif is_object?(data) # data is an object
        object_name = object_root_name if object_root_name
        object_name ||= data if data.is_a?(Symbol)
        object_name ||= collection_root_name.to_s.singularize if collection_root_name
        object_name ||= data.class.respond_to?(:model_name) ? data.class.model_name.element : data.class.to_s.downcase
        object_name
      else
        data_token
      end
    end
data_name(data) => "user"
 data_name(@user => :person) => :person
 data_name(@users) => :user
 data_name([@user]) => "users"
 data_name([]) => "array"