Class: RubyUI::BulkActionButton
- Defined in:
- lib/generators/ruby_cms/templates/components/ruby_ui/bulk_action_table/bulk_action_button.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(button_config:, controller_name:, require_confirm: true, **user_attrs) ⇒ BulkActionButton
constructor
A new instance of BulkActionButton.
- #view_template ⇒ Object
Constructor Details
#initialize(button_config:, controller_name:, require_confirm: true, **user_attrs) ⇒ BulkActionButton
Returns a new instance of BulkActionButton.
5 6 7 8 9 10 |
# File 'lib/generators/ruby_cms/templates/components/ruby_ui/bulk_action_table/bulk_action_button.rb', line 5 def initialize(button_config:, controller_name:, require_confirm: true, **user_attrs) @button_config = @controller_name = controller_name @require_confirm = require_confirm super(**user_attrs) end |
Instance Method Details
#view_template ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/generators/ruby_cms/templates/components/ruby_ui/bulk_action_table/bulk_action_button.rb', line 12 def view_template Button( variant: :outline, type: "button", data: , **(@button_config[:class] ? { class: @button_config[:class] } : {}) ) do plain label end end |