Skip to content

Instantly share code, notes, and snippets.

@kml
Created December 13, 2016 22:38
Show Gist options
  • Save kml/85b10636fddcf6714e2fa79a67de6499 to your computer and use it in GitHub Desktop.
Save kml/85b10636fddcf6714e2fa79a67de6499 to your computer and use it in GitHub Desktop.
# config/initializers/apartment.rb
require "apartment/reloader"
# skip Apartment::Reloader for assets
# (Apartment::Reloader is used only in development)
# https://github.com/influitive/apartment/blob/development/lib/apartment/railtie.rb#L43
# https://github.com/influitive/apartment/blob/development/lib/apartment/reloader.rb
Apartment::Reloader.prepend(Module.new do
def call(env)
return @app.call(env) if env['REQUEST_PATH'].start_with?("/assets/")
super(env)
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment