lib/sprockets/helpers.rb in sprockets-helpers-1.2.0 vs lib/sprockets/helpers.rb in sprockets-helpers-1.2.1
- old
+ new
@@ -37,10 +37,10 @@
# The base URL the Sprocket environment is mapped to.
# This defaults to '/assets'.
def prefix
@prefix ||= '/assets'
- @prefix.respond_to?(:first) ? "/#{@prefix.first}" : @prefix
+ @prefix.is_a?(Array) ? "/#{@prefix.first}" : @prefix
end
attr_writer :prefix
# Customize the protocol when using asset hosts.
# If the value is :relative, A relative protocol ('//')