def duplicatable(options = {})
      via = options.fetch(:via) { :form }

      if via == :save
        enable_resource_duplication_via_save
      elsif via != :form
        enable_resource_duplication_via_custom_method(via)
      else
        enable_resource_duplication_via_form
      end
    end
def duplicatable(options = {})
      via = options.fetch(:via) { :form }

      if via == :save
        enable_resource_duplication_via_save
      elsif via != :form
        enable_resource_duplication_via_custom_method(via)
      else
        enable_resource_duplication_via_form
      end
    end
Public: Enable and configure resource duplication

 options - Duplication options (default: { via: :form }):
           :via - Method of duplication. Via `:save` is the only way to
                  copy a resources relations not present in the form.

 Examples

   ActiveAdmin.register Post do
     duplicatable via: :save
   end