File: route_wrapper.rb

package info (click to toggle)
ruby-sprockets-rails 3.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 436 kB
  • sloc: ruby: 2,071; makefile: 4; javascript: 4
file content (23 lines) | stat: -rw-r--r-- 491 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Sprockets
  module Rails
    module RouteWrapper

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

      def internal?
        super || internal_assets_path?
      end

      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
    end
  end
end