diff options
author | Struan Donald <struan@exo.org.uk> | 2011-05-19 12:34:18 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-05-19 12:34:18 +0100 |
commit | 109b706b68d85708dd023faedd8065efc3839a85 (patch) | |
tree | 8157f412bd0041d59b65d2d854730a672de480eb | |
parent | 569d75790b52bf0f0d58fa95324a6ca29d1b6c33 (diff) |
add confirm convenience method
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 6eefb30b2..7259087be 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -84,4 +84,17 @@ sub check_for_errors { return \%errors; } + +=head2 confirm + +Set state of comment to confirmed + +=cut + +sub confirm { + my $self = shift; + + $self->state( 'confirmed' ); + $self->confirmed( \'ms_current_timestamp()' ); +} 1; |