Mojolicious::Plugin::GroupedParams - grouped params from query.
Version 0.01
use Mojolicious::Lite; plugin 'grouped_params'; post '/save_article' => sub { my ( $self ) = @_; my $new_article = $self->grouped_params('article'); $self->db->resultset('Article')->create($new_article); }; # In template <input name="article.name" value="<%= grouped_params('article')->{name} %>" /> <textarea name="article.text"><%= grouped_params('article')->{text} %></textarea>
Register plugin
This helper groups params with name like <group>.<name> and put grouped params into stash variable "grouped_params".
Ivan Sokolov, <ivsokolov at cpan.org>
<ivsokolov at cpan.org>
Please report any bugs or feature requests to bug-mojolicious-plugin-groupedparams at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Mojolicious-Plugin-GroupedParams. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-mojolicious-plugin-groupedparams at rt.cpan.org
Copyright 2010 Ivan Sokolov.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Mojolicious::Plugin::GroupedParams, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::GroupedParams
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::GroupedParams
For more information on module installation, please visit the detailed CPAN module installation guide.