Module: Plutonium::Helpers::AssetsHelper

Included in:
UI::Layout::Base
Defined in:
lib/plutonium/helpers/assets_helper.rb

Overview

Helper module for managing asset-related functionality

Instance Method Summary collapse

Instance Method Details

#resource_logo_assetString

Get the logo asset path

Returns:

  • (String)

    path to the logo asset



18
19
20
# File 'lib/plutonium/helpers/assets_helper.rb', line 18

def resource_logo_asset
  Plutonium.configuration.assets.
end

#resource_logo_tag(classname:) ⇒ ActiveSupport::SafeBuffer

Generate an image tag for the logo

Parameters:

  • classname (String)

    CSS class name for the image tag

Returns:

  • (ActiveSupport::SafeBuffer)

    HTML image tag



11
12
13
# File 'lib/plutonium/helpers/assets_helper.rb', line 11

def resource_logo_tag(classname:)
  image_tag(resource_logo_asset, class: classname)
end

#resource_script_assetString

Get the script asset path

Returns:

  • (String)

    path to the script asset



32
33
34
# File 'lib/plutonium/helpers/assets_helper.rb', line 32

def resource_script_asset
  Plutonium.configuration.assets.script
end

#resource_stylesheet_assetString

Get the stylesheet asset path

Returns:

  • (String)

    path to the stylesheet asset



25
26
27
# File 'lib/plutonium/helpers/assets_helper.rb', line 25

def resource_stylesheet_asset
  Plutonium.configuration.assets.stylesheet
end