Class: Avo::Resources::Controls::EditButton
- Inherits:
-
BaseControl
- Object
- BaseControl
- Avo::Resources::Controls::EditButton
- Defined in:
- lib/avo/resources/controls/edit_button.rb
Instance Attribute Summary
Attributes inherited from BaseControl
#as_index_control, #color, #confirmation_message, #icon, #icon_class, #label, #size, #style, #title
Instance Method Summary collapse
-
#initialize(**args) ⇒ EditButton
constructor
A new instance of EditButton.
Methods inherited from BaseControl
Constructor Details
#initialize(**args) ⇒ EditButton
Returns a new instance of EditButton.
5 6 7 8 9 10 11 12 |
# File 'lib/avo/resources/controls/edit_button.rb', line 5 def initialize(**args) super(**args) @label = args[:label] || I18n.t("avo.edit").capitalize if args[:item].present? @title = I18n.t("avo.edit_item", item: args[:item]).humanize if title.nil? end end |