Class: Happenings::HappeningComponent

Inherits:
CommonComponent
  • Object
show all
Defined in:
app/components/happenings/happening_component.rb

Overview

this class render an happening component for an happenings list

Instance Method Summary collapse

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.

Parameters:

  • opt, (Hash)

    turbo_frame: @turbo_frames to generate content

  • opts (Hash)

    a customizable set of options



10
11
12
13
14
# File 'app/components/happenings/happening_component.rb', line 10

def initialize(happening:, turbo_frame: "happenings", url: :happening_path)
  @happening = happening
  @turbo_frame = turbo_frame
  @url = url
end