Permalink
Browse files

Delegate freeze_formats to lookup_context

  • Loading branch information...
1 parent b454bb0 commit 0d00d65ad2d0821926c795c25161b8d1a010470c @spastorino spastorino committed Oct 16, 2010
View
4 actionpack/lib/action_view/renderer/abstract_renderer.rb
@@ -3,7 +3,7 @@ class AbstractRenderer #:nodoc:
attr_reader :lookup_context
delegate :find_template, :template_exists?, :with_fallbacks, :update_details,
- :with_layout_format, :formats, :to => :lookup_context
+ :with_layout_format, :formats, :freeze_formats, :to => :lookup_context
def initialize(view)
@view = view
@@ -33,4 +33,4 @@ def instrument(name, options={})
ActiveSupport::Notifications.instrument("render_#{name}.action_view", options){ yield }
end
end
-end
+end
View
4 actionpack/lib/action_view/renderer/template_renderer.rb
@@ -56,7 +56,7 @@ def determine_template(options) #:nodoc:
# Renders the given template. An string representing the layout can be
# supplied as well.
def render_template(template, layout_name = nil, locals = {}) #:nodoc:
- lookup_context.freeze_formats(template.formats, true)
+ freeze_formats(template.formats, true)
view, locals = @view, locals || {}
render_with_layout(layout_name, locals) do |layout|
@@ -95,4 +95,4 @@ def find_layout(layout, keys)
end
end
end
-end
+end

0 comments on commit 0d00d65

Please sign in to comment.