def object_model_name
        item = object

        is_collection = item.is_a?(Array)
        item = item.first if is_collection

        name = item.class.name.underscore

        name = name.pluralize if is_collection

        name.split("/").last
      end
def object_model_name
        item = object

        is_collection = item.is_a?(Array)
        item = item.first if is_collection

        name = item.class.name.underscore

        name = name.pluralize if is_collection

        name.split("/").last
      end
Internal: Returns the model name for an object

 Example:
   object.class.name # => User
   object_model_name => "user"