Module: Ui::Actionable
- Included in:
- Card, Collapse::Panel, DescriptiveList, Empty, List, Notification, PageHeader, Table
- Defined in:
- lib/ui/actionable.rb
Constant Summary collapse
Instance Method Summary collapse
Instance Method Details
#actions ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/ui/actionable.rb', line 5 def actions content_tag(:nav, class: 'ui-actions', role: 'navigation') do render_group( Actions[actions_list].map do |action| action.call(model) end ) end end |
#actions_length ⇒ Object
19 20 21 |
# File 'lib/ui/actionable.rb', line 19 def actions_length .fetch(:actions, Array.new).size end |
#actions_list ⇒ Object
15 16 17 |
# File 'lib/ui/actionable.rb', line 15 def actions_list .fetch(:actions, Array.new) || Array.new end |
#has_actions? ⇒ Boolean
23 24 25 |
# File 'lib/ui/actionable.rb', line 23 def has_actions? actions_list.any? end |