[Jifty-commit] r6786 - jifty/trunk/lib/Jifty/Action/Record
Jifty commits
jifty-commit at lists.jifty.org
Thu Apr 16 16:16:06 EDT 2009
Author: sartak
Date: Thu Apr 16 16:16:06 2009
New Revision: 6786
Modified:
jifty/trunk/lib/Jifty/Action/Record/Create.pm
Log:
Factor out the actual record creation in JARC into a create_record method
Modified: jifty/trunk/lib/Jifty/Action/Record/Create.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action/Record/Create.pm (original)
+++ jifty/trunk/lib/Jifty/Action/Record/Create.pm Thu Apr 16 16:16:06 2009
@@ -92,7 +92,7 @@
# Attempt creating the record
my $id;
- my $msg = $record->create(%values);
+ my $msg = $self->create_record(%values);
# Convert Class::ReturnValue to an id and message
if (ref($msg)) {
@@ -118,6 +118,21 @@
return ($self->record->id);
}
+=head2 create_record
+
+This method actually performs the call to C<< record->create >>. It receives as
+arguments the parameter hash and should return the message for the user,
+indicating success or failure.
+
+=cut
+
+sub create_record {
+ my $self = shift;
+ my $record = $self->record;
+
+ return $record->create(@_);
+}
+
=head2 report_success
Sets the L<Jifty::Result/message> to default success message,
More information about the Jifty-commit
mailing list