Skip to content

Instantly share code, notes, and snippets.

@bradleybuda
Created December 6, 2013 06:34
Show Gist options
  • Save bradleybuda/7819496 to your computer and use it in GitHub Desktop.
Save bradleybuda/7819496 to your computer and use it in GitHub Desktop.
Past Anton
# Fixes Rails 3.2.13 asset loading speed issues
# taken from: https://github.com/fredwu/rails/commit/687e68d88f5e1a7bb6a2d876fbbc5b8c4571d853#L0L162
class Sprockets::Helpers::RailsHelper::AssetPaths
raise "Do you still need this monkey with this Rails version?" unless Rails.version == "3.2.13"
if Rails.env.development?
def exact_match_present_with_speed?(source)
File.exists?(source) || exact_match_present_without_speed?(source)
end
alias_method_chain :exact_match_present?, :speed
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment