lib/turbo-sprockets/asset_resolver.rb
def resolve(logical_path)
        # If assets is not nil we're running in development and have access to the
        # sprockets environment. If assets is nil the sprockets environment
        # will not be available, so we have to fall back to the asset manifest.
        if Rails.application.assets
          asset = Rails.application.assets.find_asset(logical_path)

          if Rails.application.config.assets.digest
            asset.try(&:digest_path)
          else
            asset.try(&:logical_path)
          end
        else
          Rails.application.assets_manifest.assets[logical_path]
        end
      end
# Returns a relative, digested asset path for the given logical path.
#
# For example:
#   AssetResolver.resolve('lux/checkmark_2x.png')
#     => lux/checkmark_2x-7177b0151ec35ffb6d.png
#
Returns a relative, digested asset path for the given logical path.
Returns a relative digested asset path for the given logical path .
def resolve(logical_path)
        if Rails.application.assets
          asset = Rails.application.assets.find_asset(logical_path)
          if Rails.application.config.assets.digest
            asset.try(&:digest_path)
          else
            asset.try(&:logical_path)
          end
        else
          Rails.application.assets_manifest.assets[logical_path]
        end
      end
def resolve ( logical_path ) if Rails . application . assets asset = Rails . application . assets . find_asset ( logical_path ) if Rails . application . config . assets . digest asset . try ( & :digest_path ) else asset . try ( & :logical_path ) end else Rails . application . assets_manifest . assets [ logical_path ] end end
Returns a relative, digested asset path for the given logical path.
Returns a relative digested asset path for the given logical path .
# If assets is not nil we're running in development and have access to the # sprockets environment. If assets is nil the sprockets environment # will not be available, so we have to fall back to the asset manifest.
logical_path