Class: Avo::Resources::Controls::ShowButton
- Inherits:
-
BaseControl
- Object
- BaseControl
- Avo::Resources::Controls::ShowButton
- Defined in:
- lib/avo/resources/controls/show_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) ⇒ ShowButton
constructor
A new instance of ShowButton.
Methods inherited from BaseControl
Constructor Details
#initialize(**args) ⇒ ShowButton
Returns a new instance of ShowButton.
5 6 7 8 9 10 11 |
# File 'lib/avo/resources/controls/show_button.rb', line 5 def initialize(**args) super(**args) if args[:item].present? @title = I18n.t("avo.view_item", item: args[:item]).humanize if title.nil? end end |