Module: Sprockets::Rails::RouteWrapper

Defined in:
lib/sprockets/rails/route_wrapper.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object


13
14
15
16
17
18
19
20
# File 'lib/sprockets/rails/route_wrapper.rb', line 13

def self.included(klass)
  klass.class_eval do
    def internal_with_sprockets?
      internal_without_sprockets? || internal_assets_path?
    end
    alias_method_chain :internal?, :sprockets
  end
end

Instance Method Details

#internal?Boolean


9
10
11
# File 'lib/sprockets/rails/route_wrapper.rb', line 9

def internal?
  super || internal_assets_path?
end

#internal_assets_path?Boolean


5
6
7
# File 'lib/sprockets/rails/route_wrapper.rb', line 5

def internal_assets_path?
  path =~ %r{\A#{self.class.assets_prefix}\z}
end