diff options
author | Nathan Weizenbaum <nex342@gmail.com> | 2008-05-01 13:27:21 -0700 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-05-02 10:28:53 +0100 |
commit | b88a6dbc39fcaa12dc58d06d4222f2443f02a32a (patch) | |
tree | b95c789ef16ddf3b6bf1f9a767fe41f027a91908 /actionpack/lib/action_view/partials.rb | |
parent | f6ec296ad84ac7e321980cfdd8bba2ea6ce3a14b (diff) | |
download | rails-b88a6dbc39fcaa12dc58d06d4222f2443f02a32a.tar.gz rails-b88a6dbc39fcaa12dc58d06d4222f2443f02a32a.tar.bz2 rails-b88a6dbc39fcaa12dc58d06d4222f2443f02a32a.zip |
Capture view errors in ActionView::Template.
This means that errors raised by partials are caught by ActionView::PartialTemplate,
which in turn means they have the proper filename and line number information.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib/action_view/partials.rb')
-rw-r--r-- | actionpack/lib/action_view/partials.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/partials.rb b/actionpack/lib/action_view/partials.rb index 9afaa16918..b537eb8bf8 100644 --- a/actionpack/lib/action_view/partials.rb +++ b/actionpack/lib/action_view/partials.rb @@ -107,7 +107,7 @@ module ActionView case partial_path when String, Symbol, NilClass # Render the template - ActionView::PartialTemplate.new(self, partial_path, object_assigns, local_assigns).render + ActionView::PartialTemplate.new(self, partial_path, object_assigns, local_assigns).render_template when ActionView::Helpers::FormBuilder builder_partial_path = partial_path.class.to_s.demodulize.underscore.sub(/_builder$/, '') render_partial(builder_partial_path, object_assigns, (local_assigns || {}).merge(builder_partial_path.to_sym => partial_path)) |