Sha256: 400ab48cefbc64e9cf48792466607be1c9de56f20c160b25bc3d3308d5827f48

Contents?: true

Size: 785 Bytes

Versions: 2

Compression:

Stored size: 785 Bytes

Contents

# coding: utf-8
require "sprockets/rails/nonexistent/version"

require 'sprockets/railtie'
require 'sprockets/rails'

module Sprockets::Rails::Helper
  def stylesheet_link_tag(*sources)
    sources.each do |stylesheet|
      unless stylesheet.kind_of?(Hash)
        raise Sprockets::FileNotFound, "#{stylesheet}.css" if (Rails.env.development? || Rails.env.test?) && lookup_asset_for_path(stylesheet, :type => :stylesheet).blank?
      end
    end
    super
  end

  def javascript_include_tag(*sources)
    sources.each do |javascript|
      unless javascript.kind_of?(Hash)
        raise Sprockets::FileNotFound, "#{javascript}.js" if (Rails.env.development? || Rails.env.test?) && lookup_asset_for_path(javascript, :type => :javascript).blank?
      end
    end
    super
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sprockets-rails-nonexistent-0.0.3 lib/sprockets/rails/nonexistent.rb
sprockets-rails-nonexistent-0.0.1 lib/sprockets/rails/nonexistent.rb