Class: Ui::Buttons::Base
Constant Summary
Constants inherited
from Component
Component::VIEWPATH
Instance Method Summary
collapse
Methods inherited from Component
#capture, #render_group
Instance Method Details
#destroy ⇒ Object
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/ui/buttons/base.rb', line 28
def destroy
display(
text_with_icon(destroy_icon),
path,
button_options.merge({
method: :delete,
data: {
confirm: 'Are you sure?'
}
}),
)
end
|
#edit ⇒ Object
20
21
22
23
24
25
26
|
# File 'lib/ui/buttons/base.rb', line 20
def edit
display(
text_with_icon(edit_icon),
path,
button_options
)
end
|
#new ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/ui/buttons/base.rb', line 12
def new
display(
text_with_icon(new_icon),
path,
button_options
)
end
|
#show ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/ui/buttons/base.rb', line 4
def show
display(
text_with_icon(icon),
path,
button_options,
)
end
|