Forum: Ruby on Rails Override or delete the layouts that are generated by scaffold generated code?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Marksu (Guest)
on 2009-01-28 11:50
(Received via mailing list)
Is it possible to ‘override’ or remove the layouts that are generated
by scaffold generated code?

I have a application.html.erb layout that works perfectly with my CSS/
DIV based navigation and all I want to do is create some CRUD pages
for a couple of database tables.  But I want them to live in the
application template that I have already created…

I've tried deleting the scaffold layouts from the app/views/layouts
and I get an error from WEBrick looking for the StyleSheets??

      ActionController::UnknownAction (No action responded to

I'm using Rails 2.0.2

Thanks in advance!

Ar C. (Guest)
on 2009-01-28 16:40
Are you pointing your scaffolded controllers at the application layout?

class ScaffoldedController < ApplicationController
  layout "mylayout.html.erb"

  blah blah blah
This topic is locked and can not be replied to.