Sha256: e44be5932c82051f36039713f0bbe3647dae0e8b86694676968237add0a6f751

Contents?: true

Size: 460 Bytes

Versions: 5

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

# AssetHelper
#
# This module provides helper methods for asset management.
module AssetHelper
  # Determines if an asset has a thumbnail to render.
  #
  # @param asset [Object] The asset object to check.
  # @return [Boolean] Returns true if the asset has a file URL and file derivatives present, otherwise false.
  def asset_thumb_to_render?(asset)
    asset&.file_url&.present? && asset&.file_derivatives&.present?
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
geoblacklight_admin-0.7.0 app/helpers/asset_helper.rb
geoblacklight_admin-0.6.3 app/helpers/asset_helper.rb
geoblacklight_admin-0.6.2 app/helpers/asset_helper.rb
geoblacklight_admin-0.6.1 app/helpers/asset_helper.rb
geoblacklight_admin-0.6.0 app/helpers/asset_helper.rb