Class: Happenings::HappeningComponent
- Inherits:
-
CommonComponent
- Object
- ViewComponent::Base
- CommonComponent
- Happenings::HappeningComponent
- Defined in:
- app/components/happenings/happening_component.rb
Overview
this class render an happening component for an happenings list
Instance Method Summary collapse
-
#initialize(happening:, turbo_frame: "happenings", url: :happening_path) ⇒ HappeningComponent
constructor
A new instance of HappeningComponent.
Methods inherited from CommonComponent
#icon, #icon_text, #level, #level_item, #pagy, #turbo_yield
Methods included from ApplicationHelper
#fas_icon, #icon, #icon_text, #l_date, #l_long, #l_time, #notifications, #notify, #notify_status, #t_enum
Constructor Details
#initialize(happening:, turbo_frame: "happenings", url: :happening_path) ⇒ HappeningComponent
Returns a new instance of HappeningComponent.
9 10 11 12 13 |
# File 'app/components/happenings/happening_component.rb', line 9 def initialize(happening:, turbo_frame: "happenings", url: :happening_path) @happening = happening @turbo_frame = turbo_frame @url = url end |