It also occurred to me that we have not yet chosen a default convention for
naming CRUD methods in controllers, so here's a proposal.
package MyApp::Controller::Posts;
use Mojo::Base 'Mojolicious::Controller';
# Render a form to create a new post (submitted to "store")
sub create {...}
# Delete a post
sub destroy {...}
# Render a form to edit a post (submitted to "update")
sub edit {...}
# Render a list of posts
sub index {...}
# Render a sepcific post
sub show {...}
# Store newly created post (submitted by "create")
sub store {...}
# Store updated post (submitted by "edit")
sub update {...}
1;
--
sebastian
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.