grimen / dry_scaffold

Rails: A Rails scaffold generator that generates DRYer, cleaner, and more useful code. IMPORTANT: Not maintained anymore.
MIT License
124 stars 14 forks source link

@resource and @collection throw errors in views #19

Open splendeo opened 14 years ago

splendeo commented 14 years ago

Right now the following order generates errors (with all the dependencies installed): ./script/generate dscaffold Duck name:string about:text _actions:new,create,index,quack

The errors are:

  1. On apps/views/duck/index.html.haml @collection.each do |resource| #gives an error (@collection is nil)
  2. On apps/views/duck/new.html.haml semantic_form_for(@resource) do |form| #gives an error (@resource is nil)

I believe the second error will also happen on edit - I just didn't generate a view for the action.

If I change @collection and @resource to @ducks and @duck the errors go away.

sspross commented 14 years ago

same here... everything installed as a plugin, except inherited_resources