[Bast-commits] r9847 - in ironman/IronMan-Web/trunk:
lib/IronMan/Web/Controller root
dhoss at dev.catalyst.perl.org
dhoss at dev.catalyst.perl.org
Tue Mar 29 22:29:16 GMT 2011
Author: dhoss
Date: 2011-03-29 22:29:16 +0000 (Tue, 29 Mar 2011)
New Revision: 9847
Added:
ironman/IronMan-Web/trunk/root/update_feed.tt
Modified:
ironman/IronMan-Web/trunk/lib/IronMan/Web/Controller/Root.pm
Log:
added update_feed template
Modified: ironman/IronMan-Web/trunk/lib/IronMan/Web/Controller/Root.pm
===================================================================
--- ironman/IronMan-Web/trunk/lib/IronMan/Web/Controller/Root.pm 2011-03-29 22:28:58 UTC (rev 9846)
+++ ironman/IronMan-Web/trunk/lib/IronMan/Web/Controller/Root.pm 2011-03-29 22:29:16 UTC (rev 9847)
@@ -142,9 +142,9 @@
my ($self, $c, $id) = @_;
my $feed = $c->model('FeedDB::Feed')->find({ id => $id });
if ( defined $feed ) {
- $c->res->body("welcome " . $feed->owner);
+ $c->stash( owner => $feed->owner );
} else {
- $c->res->body("user not found");
+ $c->stash( error => "No such user" );
}
}
Added: ironman/IronMan-Web/trunk/root/update_feed.tt
===================================================================
--- ironman/IronMan-Web/trunk/root/update_feed.tt (rev 0)
+++ ironman/IronMan-Web/trunk/root/update_feed.tt 2011-03-29 22:29:16 UTC (rev 9847)
@@ -0,0 +1,5 @@
+[% UNLESS error %]
+<p>Welcome, [% owner %]</p>
+[% ELSE %]
+[% error %]
+[% END %]
More information about the Bast-commits
mailing list