Module: Iron::ApplicationHelper

Includes:
AvatarHelper, ContentTypesHelper, EntriesHelper, IconsHelper, TransfersHelper, UiHelper
Defined in:
app/helpers/iron/application_helper.rb

Constant Summary collapse

TAILWIND_MERGER =
TailwindMerge::Merger.new.freeze

Constants included from IconsHelper

IconsHelper::SPRITE_PATH

Constants included from UiHelper

UiHelper::FIELD_TYPE_BADGE_CLASSES

Instance Method Summary collapse

Methods included from IconsHelper

#icon

Methods included from AvatarHelper

#avatar

Methods included from UiHelper

#back_button_to, #badge, #field_type_badge, #field_type_meta

Methods included from EntriesHelper

#current_content_page?

Methods included from ContentTypesHelper

#content_type_sidebar_url

Methods included from TransfersHelper

#button_to_copy_to_clipboard, #qr_code_image, #web_share_button

Instance Method Details

#email_configured?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'app/helpers/iron/application_helper.rb', line 16

def email_configured?
  EmailConfiguration.available?
end

#tw(*classes) ⇒ Object



8
9
10
# File 'app/helpers/iron/application_helper.rb', line 8

def tw(*classes)
  TAILWIND_MERGER.merge(classes.reject(&:blank?).compact.join(" "))
end

#unique_idObject



12
13
14
# File 'app/helpers/iron/application_helper.rb', line 12

def unique_id
  rand(10000000..100000000)
end