Method: Sprockets::Resolve#resolve!
- Defined in:
- lib/sprockets/resolve.rb
#resolve!(path, options = {}) ⇒ Object
Public: Same as resolve() but raises a FileNotFound exception instead of nil if no assets are found.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/sprockets/resolve.rb', line 51 def resolve!(path, = {}) uri, deps = resolve(path, .merge(compat: false)) unless uri = "couldn't find file '#{path}'" if relative_path?(path) && [:base_path] load_path, _ = paths_split(config[:paths], [:base_path]) << " under '#{load_path}'" end << " with type '#{[:accept]}'" if [:accept] raise FileNotFound, end return uri, deps end |