Re: Edit an object without creating it
On Tue, Dec 6, 2011 at 8:48 PM, phpMagpie <paul@webbedit.co.uk> wrote:
> You gave no indication this was to be a REST enabled application and as 99%
> of apps are not REST then the replies were valid.
I gave no indication because the problem I mentioned apply on both
REST and not-REST applications.
Imagine you are creating a webapp for blog posts; to insert a new
entry you would fill a form (title and body) and then sumbit those
data to the right URI (posts/add). Now, to edit an already submitted
post, you would fill a form (similar to the previous but containing
the post id as an hidden field) and then submit the data to the server
(posts/edit). You will agree with me that the edit action, with or
without the form, is still in need of validating the input id: update
the post if valid, otherwise discard the request. Then my question is:
CakePHP has something which updates a record only if provided id is
valid or should I have to wrap the aforementioned logic?
Regards,
Matteo
--
http://www.matteolandi.net/
--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home