Class: Jquard::Tables::Actions::DeleteAction

Inherits:
Action
  • Object
show all
Defined in:
lib/jquard/tables/actions/delete_action.rb

Instance Method Summary collapse

Methods inherited from Action

#icon, #label, make

Methods included from ComponentDispatch

#component_class

Instance Method Details

#confirm(value = nil) ⇒ Object



5
6
7
8
9
10
# File 'lib/jquard/tables/actions/delete_action.rb', line 5

def confirm(value = nil)
  return @confirm || "Are you sure you would like to do this?" if value.nil?

  @confirm = value
  self
end

#confirm_button(value = nil) ⇒ Object



19
20
21
22
23
24
# File 'lib/jquard/tables/actions/delete_action.rb', line 19

def confirm_button(value = nil)
  return @confirm_button || label if value.nil?

  @confirm_button = value
  self
end

#confirm_heading(value = nil) ⇒ Object



12
13
14
15
16
17
# File 'lib/jquard/tables/actions/delete_action.rb', line 12

def confirm_heading(value = nil)
  return @confirm_heading if value.nil?

  @confirm_heading = value
  self
end