Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…g with Rails 3.2
  • Loading branch information...
commit 0107aae74ad8ca5887705af60f4caf493cc1156e 1 parent 5c39a37
@dhh dhh authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.