Re: Use the dreaded requestAction()... or use something else?

2009-02-03 Thread RichardAtHome
Request action isn't *that* bad ;-) In this case request action should be fine as you wont be calling it very often (as opposed to say from in an element that is displayed on every page). That said, Graham's suggestion is a better solution. Note, to get the best performance from requestAction

Re: Use the dreaded requestAction()... or use something else?

2009-02-02 Thread Rodrigo Rodrigues Moyle
You try to use saveAll? On Mon, Feb 2, 2009 at 10:16 AM, Graham Weldon gra...@grahamweldon.comwrote: If some association exists between these objects, you can do something like: $this-User-save($this-data); $this-User-Site-save(array('Site' = array( 'user_id' = $this-User-id, //

Use the dreaded requestAction()... or use something else?

2009-02-02 Thread Turgs
Hello all What's an appropriate use of requestAction()? I have 3 controllers: * UsersController * SiteController * SitePagesController Within the add() function of UsersController, I want to (a) create a new user (b) create a new site for that user with (c) one new page for that site.

Re: Use the dreaded requestAction()... or use something else?

2009-02-02 Thread Graham Weldon
If some association exists between these objects, you can do something like: $this-User-save($this-data); $this-User-Site-save(array('Site' = array( 'user_id' = $this-User-id, // --- any other data ))); $this-User-Site-SitePage-save(array('SitePage' = array( 'site_id' =