mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
17 lines
No EOL
436 B
Ruby
17 lines
No EOL
436 B
Ruby
module Middleman::CoreExtensions::Assets
|
|
class << self
|
|
def registered(app)
|
|
# Disable Padrino cache buster until explicitly enabled
|
|
# app.set :asset_stamp, false
|
|
|
|
app.send :include, InstanceMethod
|
|
end
|
|
alias :included :registered
|
|
end
|
|
|
|
module InstanceMethod
|
|
def asset_url(path, prefix="")
|
|
path.include?("://") ? path : File.join(self.http_prefix || "/", prefix, path)
|
|
end
|
|
end
|
|
end |