views:

361

answers:

2

I have a joins table which brings a users table and a Communications table together. I have the appropriate relationships built in Cake. When I use 'var $scaffold;' in the controllers everything links up perfect. I can view, add, and edit records in both directions. However, when I remove the 'var $scaffold feature through the Bake console and let bake create the standard index, view, add, edit files all that capabillity goes away. I was under the impression, from the cookbook manual, that bake would recreate the index, view, add, edit files exactly as 'var $scaffold;' creates them thus allowing me to edit them as I see fit. Am I wrong in this assumption? Is there some way to see the code generated by scaffold when it renders a view. I know about the scaffold templates but I must admit they are still a little above my knowledge base yet.

Love the site by the way.

Thank You

A: 

Are you baking each component of the MVC individually? If so, when you're baking the controller it will ask you if you want to include the basic CRUD actions (add, edit, view, delete). After that, bake the view and it will ask you if you want the CRUD views (if I recall correctly this defaults to no).

Mike B
Thank You for responding Mike. Yes I am baking everything in order and telling it to create the basic CRUD actions. It firsts ask if you want to use the scaffold feature, wihch defaults to 'No' and then, if you say 'No' it asks if you want the standard CRUD actions. The standard CRUD actions are created but the code created is only basic CRUD without the features the 'var $scaffold;' feature creates.
Can you be more specific as to what 'features' are missing? To answer your question about 'seeing the code generated by using var $scaffold' that is essentially what baking was meant to do so you should see, if not exact, extremely similar functionality.
Mike B
A: 

I have a similar question. I baked my controllers and views with scaffolding, but now when I make changes to the views, I dont see those changes reflected.

Do I need to get rid of the scaffolding first?

Not sure I fully understand what scaffolding does, and how this relates to baking...

thanks

Evan