Class: SolidusPromotions::PromotionCategories::New::Component

Inherits:
SolidusAdmin::BaseComponent
  • Object
show all
Defined in:
lib/components/admin/solidus_promotions/promotion_categories/new/component.rb

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ Component

Returns a new instance of Component.



4
5
6
7
# File 'lib/components/admin/solidus_promotions/promotion_categories/new/component.rb', line 4

def initialize(record)
  super
  @promotion_category = record
end

Instance Method Details

#form_idObject



9
10
11
# File 'lib/components/admin/solidus_promotions/promotion_categories/new/component.rb', line 9

def form_id
  dom_id(@promotion_category, "#{stimulus_id}_new_promotion_category_form")
end

#form_urlObject



13
14
15
# File 'lib/components/admin/solidus_promotions/promotion_categories/new/component.rb', line 13

def form_url
  solidus_promotions.promotion_categories_path(**search_filter_params)
end