Module: ThunderclapHelper

Defined in:
app/helpers/thunderclap_helper.rb

Overview

This module provides helper methods for the Thunderclap feature. frozen_string_literal: true

Instance Method Summary collapse

Instance Method Details

#render_thunderclap(flash: nil) ⇒ String

Renders the flash message with an optional auto dismiss delay.

Parameters:

  • auto_dismiss_delay (Integer)

    The delay in milliseconds before the flash message automatically dismisses.

Returns:

  • (String)

    The rendered flash message.



9
10
11
# File 'app/helpers/thunderclap_helper.rb', line 9

def render_thunderclap(flash: nil)
  render 'thunderclap/partials/flash', flash_object: flash
end