Scaffolding Extension Plugin... You use it?


I’m working with the Scaffolding Extension Plugin which I found here:

I like it, I think it will save me some typing.

I’m developing a system which has several hundred tables.

I need to automate much of the creation of rhtml which itself
generates html-option-select-foreign-key elements.

Are any of you working with this plugin?

I worked through the tutorial and it functioned well on my mac
running edge rails 5467.

Next, in my app I created a simple relationship:

Each Client has 0 or more Facilities.

The only thing strange I can see about this is that
Facilities is not Facilitys

Here is the error I see from my controller.

How would you approach the problem of debugging this controller exception ?

ArgumentError in Crud#new_facility

Showing vendor/plugins/scaffolding_extensions/scaffolds/new.rhtml where line #3 raised:

wrong number of arguments (0 for 1)

Extracted source (around line #3):


Create new <%= @scaffold_singular_name.humanize.downcase %>

3: <%= scaffold_form(‘create’, :fields=>@scaffold_class.scaffold_new_fields) %>
5: <%= manage_link %>




I got it working.

I changed a few things; I’m not sure what fixed it:

  • rake rails:freeze:edge

  • reinstalled the plugin from svn

  • rm development.sqlite3

  • touch development.sqlite3

  • rake db:migrate

  • bounced webrick

  • simplified my model classes so they only have this:

class Client < ActiveRecord::Base

has_many :facilities


class Facility < ActiveRecord::Base

belongs_to :client


And now…

it works good.

I’m happy.



Just a note from the author that the Scaffolding Extensions plugin is
not tested or supported on Edge Rails. One thing known to be broken
is the support for booleans, due to changes in InstanceTag. If you
want to use the plugin, stick with Rails 1.1.6 until Rails 1.2 is
released and the plugin is updated to support it.