class ActiveAdmin::Views::IndexAsTable::IndexTableFor

Public Instance Methods

defaults(resource, options = {}) click to toggle source
# File lib/active_admin_paranoia/dsl.rb, line 59
def defaults(resource, options = {})
  if resource.respond_to?(:deleted?) && resource.deleted?
    if controller.action_methods.include?('restore') && authorized?(ActiveAdminParanoia::Auth::RESTORE, resource)
      # TODO: find a way to use the correct path helper
      item I18n.t('active_admin_paranoia.restore'), "#{resource_path(resource)}/restore", method: :put, class: "restore_link #{options[:css_class]}",
        data: {confirm: I18n.t('active_admin_paranoia.restore_confirmation')}
    end
  else
    orig_defaults(resource, options)
  end
end
Also aliased as: orig_defaults
orig_defaults(resource, options = {})
Alias for: defaults