[Rails] scaffold_path

Sascha Ebach se at digitale-wertschoepfung.de
Tue Nov 23 12:01:52 GMT 2004


Hello Sean,

Sean O'Halpin wrote:
> Anybody know an easy way to redefine scaffold_path
> globally rather than having to override it on a controller
> by controller basis?

I suspect you want to overwrite or change the

ActionController::Scaffolding::ClassMethods::scaffold_path

method. It reads

def scaffold_path(template_name)
  File.dirname(__FILE__) + "/templates/scaffolds/" + template_name + 
".rhtml"
end

On my installtion this method sits in

/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/scaffolding.rb


Good luck,

Sascha Ebach


More information about the Rails mailing list