Class: SolidusAdmin::StockItems::Edit::Component
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- SolidusAdmin::StockItems::Edit::Component
- Defined in:
- app/components/solidus_admin/stock_items/edit/component.rb
Instance Method Summary collapse
- #form_id ⇒ Object
-
#initialize(stock_item:, page:) ⇒ Component
constructor
A new instance of Component.
- #title ⇒ Object
Constructor Details
#initialize(stock_item:, page:) ⇒ Component
Returns a new instance of Component.
4 5 6 7 |
# File 'app/components/solidus_admin/stock_items/edit/component.rb', line 4 def initialize(stock_item:, page:) @stock_item = stock_item @page = page end |
Instance Method Details
#form_id ⇒ Object
15 16 17 |
# File 'app/components/solidus_admin/stock_items/edit/component.rb', line 15 def form_id "#{stimulus_id}-#{dom_id(@stock_item)}" end |
#title ⇒ Object
9 10 11 12 13 |
# File 'app/components/solidus_admin/stock_items/edit/component.rb', line 9 def title [ "#{Spree::StockLocation.model_name.human}: #{@stock_item.stock_location.name}", ].join(' / ') end |