Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove Rails EJS support, it's been broken for a while. May come back…

… as a plugin.
  • Loading branch information...
commit f1a122c16f36bf0581d678410399a4a18abf6365 1 parent e398de6
John Barnette authored
Showing with 0 additions and 38 deletions.
  1. +0 −1  Manifest.txt
  2. +0 −37 lib/rails/init.rb
1  Manifest.txt
View
@@ -60,7 +60,6 @@ lib/johnson/visitors/ecma_visitor.rb
lib/johnson/visitors/enumerating_visitor.rb
lib/johnson/visitors/sexp_visitor.rb
lib/johnson/visitors/visitor.rb
-lib/rails/init.rb
test/helper.rb
test/johnson/browser_test.rb
test/johnson/conversions/array_test.rb
37 lib/rails/init.rb
View
@@ -1,37 +0,0 @@
-require 'johnson'
-
-class EJSHandler < ActionView::TemplateHandler
- class EJSProxy # :nodoc:
- def initialize(controller)
- @controller = controller
- end
-
- def key?(pooperty)
- @controller.instance_variables.include?("@#{pooperty}")
- end
-
- def [](pooperty)
- @controller.instance_variable_get("@#{pooperty}")
- end
-
- def []=(pooperty, value)
- @controller.instance_variable_set("@#{pooperty}", value)
- end
- end
-
- def initialize(view)
- @view = view
- end
-
- def render(template)
- ctx = Johnson::Runtime.new
- ctx.evaluate('Johnson.require("johnson/template");')
- ctx['template'] = template.source
- ctx['controller'] = @view.controller
- ctx['at'] = EJSProxy.new(@view.controller)
-
- ctx.evaluate('Johnson.templatize(template).call(at)')
- end
-end
-
-ActionView::Template.register_template_handler("ejs", EJSHandler)
Please sign in to comment.
Something went wrong with that request. Please try again.