Sha256: 47da6d7e677baa00e9c4128246b7802ad4313907ae77d06c9960808eb02a2df8

Contents?: true

Size: 520 Bytes

Versions: 3

Compression:

Stored size: 520 Bytes

Contents

require "rails_sandbox_jasmine/version"
require "rails-sandbox-assets"

module RailsSandboxJasmine
  class JasmineFilter
    def self.filter(controller)
      controller.template = 'jasmine/runner' if controller.params[:path].try :start_with?, 'jasmine'
    end
  end

  class Engine < Rails::Engine
    initializer 'sandbox_assets.jasmine' do |app|
      unless app.config.sandbox_assets.template == 'jasmine/runner'
        SandboxAssets::BaseController.prepend_before_filter JasmineFilter
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails_sandbox_jasmine-0.0.3 lib/rails_sandbox_jasmine.rb
rails_sandbox_jasmine-0.0.2 lib/rails_sandbox_jasmine.rb
rails_sandbox_jasmine-0.0.1 lib/rails_sandbox_jasmine.rb