Topic: Scaffolding Extensions Plugin - Code generation

Hi,

I'm using Scaffolding Extensions plugin in my application by adding below code (from  http://wiki.rubyonrails.org/rails/pages … ons+Plugin )

class CrudController < ApplicationController
  scaffold_all_models
end

And Its working fine for me.

How can i generate code for this to customize some of view pages as per my requirements ?

Thanking you.
Ravi

Re: Scaffolding Extensions Plugin - Code generation

Did you try the script at the bottom of the wiki page?

script/runner "puts ActionController::Base.scaffold_all_models(:generate=>true)"

Alex

Re: Scaffolding Extensions Plugin - Code generation

Hi,

some time ago I asked the author the same quesion, here is his answer:

The .rhtml files it uses are in the scaffolds folder inside the
plugin, but they are generic and not custom to a specific model.  It
isn't a generator, so it doesn't produce controller and view files.
It is a collection of methods that adds actions to a controller as
well as necessary support code.

The plugin is designed to provide a simple but powerful administrative
front end to the models.  It supports many customization options.  If
you find that there is a customization option that is missing, please
send in a patch and I'll review it.

Jeremy

Niels

Re: Scaffolding Extensions Plugin - Code generation

nlib wrote:

Hi,

some time ago I asked the author the same quesion, here is his answer:

The .rhtml files it uses are in the scaffolds folder inside the
plugin, but they are generic and not custom to a specific model.  It
isn't a generator, so it doesn't produce controller and view files.
It is a collection of methods that adds actions to a controller as
well as necessary support code.

The plugin is designed to provide a simple but powerful administrative
front end to the models.  It supports many customization options.  If
you find that there is a customization option that is missing, please
send in a patch and I'll review it.

Jeremy

Niels

Thanking you for your valid information. I can able to see the action methods by below command, but not able to customize the view pages.

script/runner "puts ActionController::Base.scaffold_all_models(:generate=>true)"

Let me know, are there any alternatives for this ?

-Ravi

Re: Scaffolding Extensions Plugin - Code generation

Hi Ravi,

From the sound of it, they are stored within the plugin. Do a search for all .rhtml files within yourapp/vendor/plugins/scaffolding_extensions/. You should then be able to edit them like you would normal view files.

Alex

Re: Scaffolding Extensions Plugin - Code generation

Hi Alex,

I can able to customize the controller action methods and view pages as well. I found all scaffold stuff in plugins folder.


Thanks a lot Alex.