projects
/
catagits/catbook-code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
add 'to' action to controller, add test (currently failing, show error)
[catagits/catbook-code.git]
/
lib
/
LolCatalyst
/
Lite
/
Controller
/
Translate.pm
diff --git
a/lib/LolCatalyst/Lite/Controller/Translate.pm
b/lib/LolCatalyst/Lite/Controller/Translate.pm
index
04d6a96
..
749b3ac
100644
(file)
--- a/
lib/LolCatalyst/Lite/Controller/Translate.pm
+++ b/
lib/LolCatalyst/Lite/Controller/Translate.pm
@@
-34,4
+34,13
@@
sub view :Chained('object') :PathPart('') :Args(0) {
);
}
+sub translate_to :Chained('object') :PathPart('to') :Args(1) {
+ my ($self, $c, $to) = @_;
+ my $object = $c->stash->{object};
+ $c->stash(
+ result => $object->translated_to($to)
+ );
+ $c->stash(template => 'translate/view.tt');
+}
+
1;