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

Ticket #5511 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

[PATCH] Scaffold generator omits containing module for layout.rhtml

Reported by: nils@alumni.rice.edu Assigned to: David
Priority: normal Milestone:
Component: Railties Version: 1.1.1
Severity: normal Keywords: scaffold generator module namespace layout
Cc:

Description

Assume a database table called people. The scaffold generator does not correctly handle the following command line for creating a Person model and a PeopleController controller:

ruby script/generate scaffold Person Admin::People

It creates the entire scaffold correctly with the exception of the layout, people.rhtml. This file it creates in app/views/layouts instead of in app/views/layouts/admin. As a result, at runtime Rails does not find a layout for the actions of people_controller.rb and thus renders their views without a layout.

Attachments

ticket5511_20060606T0914.patch (0.7 kB) - added by nils@alumni.rice.edu on 06/26/06 14:14:31.
Patch for this defect

Change History

06/26/06 14:14:31 changed by nils@alumni.rice.edu

  • attachment ticket5511_20060606T0914.patch added.

Patch for this defect

07/01/06 00:11:36 changed by bitsweat

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

(In [4527]) Generate scaffold layout in subdirectory appropriate to its module nesting. Closes #5511.