Class: ActionLink::Destroy

Inherits:
Base show all
Defined in:
app/components/action_link/destroy.rb

Overview

An action link that indicates deleting a new record.

Constant Summary collapse

ICON =
'times-circle'

Instance Method Summary collapse

Methods inherited from Base

#icon?, #icon_tag, #options, #permission?

Methods inherited from ApplicationComponent

#initialize

Constructor Details

This class inherits a constructor from ActionLink::ApplicationComponent

Instance Method Details

#confirmationObject



30
31
32
33
34
35
# File 'app/components/action_link/destroy.rb', line 30

def confirmation
  return manual_confirmation if manual_confirmation

  I18n.t(i18n_confirmation_key,
         subject: strip_tags(confirmation_subject || default_confirmation_subject))
end

#http_methodObject



37
38
39
# File 'app/components/action_link/destroy.rb', line 37

def http_method
  :delete
end

#i18n_title_keyObject



24
25
26
27
28
# File 'app/components/action_link/destroy.rb', line 24

def i18n_title_key
  return 'action_link_component.titles.unassign' if associative

  super
end