Browse files

Yank ActionView::Template hook-in in anticipation of Jbuilder shippin…

…g with Rails 3.2
  • Loading branch information...
1 parent 5c39a37 commit 0107aae74ad8ca5887705af60f4caf493cc1156e @dhh dhh committed Nov 28, 2011
Showing with 1 addition and 9 deletions.
  1. +1 −2 lib/jbuilder.rb
  2. +0 −7 lib/railtie.rb
View
3 lib/jbuilder.rb
@@ -3,7 +3,6 @@
require 'active_support/core_ext/array/access'
require 'active_support/core_ext/enumerable'
require 'active_support/json'
-require 'railtie' if defined? Rails
class Jbuilder < BlankSlate
# Yields a builder and automatically turns the result into a JSON string
@@ -159,4 +158,4 @@ def _yield_iteration(container, collection)
def _inline_extract(container, record, attributes)
__send__(container) { |parent| parent.extract! record, *attributes }
end
-end
+end
View
7 lib/railtie.rb
@@ -1,7 +0,0 @@
-class Jbuilder < BlankSlate
- class Railtie < Rails::Railtie
- initializer "jbuilder.template_handler" do
- ActionView::Template.register_template_handler :jbuilder, -> template { "Jbuilder.encode do |json|;#{template.source};end;" }
- end
- end
-end

0 comments on commit 0107aae

Please sign in to comment.