diff options
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/actionview.gemspec | 2 | ||||
-rw-r--r-- | actionview/lib/action_view/rendering.rb | 19 | ||||
-rw-r--r-- | actionview/test/fixtures/helpers/abc_helper.rb | 2 |
3 files changed, 13 insertions, 10 deletions
diff --git a/actionview/actionview.gemspec b/actionview/actionview.gemspec index 87cb568300..cdac074973 100644 --- a/actionview/actionview.gemspec +++ b/actionview/actionview.gemspec @@ -5,7 +5,7 @@ Gem::Specification.new do |s| s.name = 'actionview' s.version = version s.summary = 'Rendering framework putting the V in MVC (part of Rails).' - s.description = '' + s.description = 'Simple, battle-tested conventions and helpers for building web pages.' s.required_ruby_version = '>= 1.9.3' diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb index c1945cc0c5..18a0788f8e 100644 --- a/actionview/lib/action_view/rendering.rb +++ b/actionview/lib/action_view/rendering.rb @@ -77,13 +77,6 @@ module ActionView @_view_renderer ||= ActionView::Renderer.new(lookup_context) end - # Render template to response_body - # :api: public - def render(*args, &block) - options = _normalize_render(*args, &block) - self.response_body = render_to_body(options) - end - # Find and renders a template based on the options given. # :api: private def _render_template(options) #:nodoc: @@ -91,12 +84,24 @@ module ActionView view_renderer.render(view_context, options) end + def render_to_body(options = {}) + _process_options(options) + _render_template(options) + end + def rendered_format Mime[lookup_context.rendered_format] end private + # Assign the rendered format to lookup context. + def _process_format(format) #:nodoc: + super + lookup_context.formats = [format.to_sym] + lookup_context.rendered_format = lookup_context.formats.first + end + # Normalize args by converting render "foo" to render :action => "foo" and # render "foo/bar" to render :file => "foo/bar". # :api: private diff --git a/actionview/test/fixtures/helpers/abc_helper.rb b/actionview/test/fixtures/helpers/abc_helper.rb index 7104ff3730..cf2774bb5f 100644 --- a/actionview/test/fixtures/helpers/abc_helper.rb +++ b/actionview/test/fixtures/helpers/abc_helper.rb @@ -1,5 +1,3 @@ module AbcHelper def bare_a() end - def bare_b() end - def bare_c() end end |