We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bc416b commit 5b5c46aCopy full SHA for 5b5c46a
lib/sprockets/railtie.rb
@@ -3,19 +3,18 @@
3
require 'action_controller/railtie'
4
require 'sprockets'
5
require 'sprockets/rails/helper'
6
+require 'active_support/core_ext/module/remove_method'
7
8
module Rails
9
class Application
10
# Hack: We need to remove Rails' built in config.assets so we can
11
# do our own thing.
12
class Configuration
- if instance_methods.map(&:to_sym).include?(:assets)
13
- undef_method :assets
14
- end
+ remove_possible_method :assets
15
end
16
17
# Undefine Rails' assets method before redefining it, to avoid warnings.
18
19
# Returns Sprockets::Environment for app config.
20
def assets
21
return @assets if defined? @assets
0 commit comments