Scaffolding Extension Plugin... You use it?

People,

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

http://wiki.rubyonrails.com/rails/pages/Scaffolding+Extensions+Plugin

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):

1:

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

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

??

-Dan

People,

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

end

class Facility < ActiveRecord::Base

belongs_to :client

end

And now…

it works good.

I’m happy.

thanks!

-Dan

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.

Jeremy