Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #6808 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

[PATCH] Failing test for render method with json

Reported by: josh Assigned to: bitsweat
Priority: normal Milestone: 1.2 regressions
Component: ActionPack Version: 1.2.0rc1
Severity: normal Keywords:
Cc:

Description

So far there are only tests for the render_json method and it works fine. Using render :json renders your current layout along with the json.

The provide test fails. I can't seem find anything with layouts in render.rb. I guess it's somewhere in actionpack I'm not familiar with.

A work around for now would just be to use render_json or render :json ..., :layout => false.

Attachments

json_symbol_test.diff (1.0 kB) - added by josh on 12/09/06 19:13:39.
json_layout_patch.diff (1.7 kB) - added by josh on 12/10/06 01:15:36.
Patch that fixes bug along with unit tests.

Change History

12/09/06 19:13:39 changed by josh

  • attachment json_symbol_test.diff added.

12/09/06 22:40:11 changed by josh

  • summary changed from [PATH] Failing test for render method with json to [PATCH] Failing test for render method with json.

12/10/06 00:46:35 changed by josh

  • keywords set to 1.2regression.
  • version set to 1.2.0rc1.

12/10/06 01:15:10 changed by josh

Add :json to be exempt from candidate for layout.

Second attachment has the included tests along with the fix.

12/10/06 01:15:36 changed by josh

  • attachment json_layout_patch.diff added.

Patch that fixes bug along with unit tests.

12/19/06 04:41:59 changed by rick

  • status changed from new to closed.
  • resolution set to fixed.

(In [5746]) Ensure render :json => ... skips the layout. Closes #6808 [Josh Peek]

03/04/07 13:48:44 changed by bitsweat

  • keywords deleted.
  • milestone changed from 1.2 to 1.2 regressions.