i am curious as to what $this->SwissArmy is all about...
hrmm
having just spun up bake to try and build an example I've discovered through
a bit of code review that I'm probably creating more work for myself....I
like you haven't really "looked" at the default bake templates for a long
while,
I've tended to get in the habit of doing things like:
function view($id = null) {
if (!$id) {
//redirect
}
$this->set('group', $this->Group->getGroup($id)); // which appears now to be
just an alias for the generated model read call...
}
where the baked method removes the needless method function I've gone and
created for myself....
Trying to think now why I got into this habit...ignore my previous postings
on the matter...i'm off to undo a bunch of things now.
On Fri, Jan 28, 2011 at 10:06 PM, AD7six <[email protected]> wrote:
>
>
> On Jan 28, 12:45 pm, Greg Skerman <[email protected]> wrote:
> > i don't do my own bake templates..mainly because i can't be bothered/have
> > never bothered to try
> >
> > The default bake templates place all the find/save logic into the
> > controller, where I prefer to have get/set/find stuff in the model....
>
> maybe I just don't remember what the default bake templates look like
> - but they don't contain anything that I recall is relevant to put in
> a model.
>
> care to give a specific example?
>
> For reference, that's an example of one of my baked controllers
> https://github.com/AD7six/skel/blob/master/controllers/users_controller.php
>
> AD
> PS. bake templates are delete-key friendly
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>For
> more options, visit this group at
> http://groups.google.com/group/cake-php
>
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php