Skip to content

Commit

Permalink
chore: make rubocop happy
Browse files Browse the repository at this point in the history
  • Loading branch information
joelmoss committed Oct 29, 2024
1 parent 875e7dd commit 044716e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/proscenium/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ def sideload_assets(value)
# /app/javascript.
def compute_asset_path(path, options = {})
if %i[javascript stylesheet].include?(options[:type])
if !path.start_with?("./", "../")
path.prepend DEFAULT_RAILS_ASSET_PATHS[options[:type]]
end
path.prepend DEFAULT_RAILS_ASSET_PATHS[options[:type]] unless path.start_with?('./', '../')

result = Proscenium::Builder.build_to_path(path, base_url: request.base_url)
return result.split("::").last.delete_prefix "public"
return result.split('::').last.delete_prefix 'public'
end

super
Expand Down

0 comments on commit 044716e

Please sign in to comment.