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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
42edc56ebba8b8dab3d729f883b61142?d=identicon&s=25 Marksu (Guest)
on 2009-01-28 10: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
stylesheets):

I'm using Rails 2.0.2

Thanks in advance!

Marksu
D188e591eac11021329b8821a5f954c7?d=identicon&s=25 Ar Chron (railsdog)
on 2009-01-28 15:40
Are you pointing your scaffolded controllers at the application layout?

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

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