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

Ticket #9272 (closed defect: fixed)

Opened 11 months ago

Last modified 9 months ago

[PATCH] generate/scaffold breaks with nested resource.

Reported by: alancfrancis Assigned to: core
Priority: normal Milestone: 1.2.5
Component: Railties Version: edge
Severity: normal Keywords: scaffold generator layout
Cc:

Description

Currently, script/generate scaffold admin/person dies when it cant create the layout file (views/layouts/admin/people.html.erb)

There seems to have been a previous bug and fix #5511, but this seems to have resurfaced.

I'm working on another, larger patch that has a bunch fo tests for nested resources (there are currently none in the scaffold generator test) and that will correctly generate route:

map.namespace :admin do |admin|

admin.resources :people

end

This little patch just fixes the immediate bug. i.e the generator runs to completion, but there is fixup work for the user to make it actually go.

Attachments

namespaced_controller.diff (0.9 kB) - added by alancfrancis on 08/15/07 14:28:39.
patchfile

Change History

08/15/07 14:28:39 changed by alancfrancis

  • attachment namespaced_controller.diff added.

patchfile

08/19/07 17:39:44 changed by alancfrancis

"...a bunch of tests for nested resources...", of course what I *meant* to say was 'namespaced controllers', not 'nested resources', which usually means something entirely different, RESTfully speaking.

10/08/07 00:54:30 changed by bitsweat

(In [7784]) Create layout dir it's nested. References #9272 [alancfrancis]

10/08/07 01:02:37 changed by bitsweat

  • milestone changed from 1.2 regressions to 1.2.5.

This is not a 1.2 regression, considering it didn't even exist in 1.1.6.

10/08/07 01:03:03 changed by bitsweat

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

(In [7785]) Create layout dir it's nested. Closes #9272 [alancfrancis]

10/08/07 05:16:29 changed by alancfrancis

Hi Jeremy,

Apologies, I obviously don't understand the terminology. Since a previous bug has been fixed (#5511 - in Rails 1.1.1), and had resurfaced, I assumed it would be a regression.

Alan

10/08/07 06:04:19 changed by bitsweat

Indeed! You're right.