You don't need to store the data in $c->session.
if you're using Catalyst::View::TT, you just be able to:
$c->stash->{project}=$c->model('DB::Project')->find($project_id);
and then in your view:
<h3>[% project.project_name %]</h3>
regards
On Oct 15, 2012, at 12:28 PM, Tadhg <[email protected]> wrote:
> Catalyst Controller Code:
> sub Project :Local {
> my ($self, $c, $project_id) = @_;
>
> $c->stash(projects => [$c->model('DB::Project')->find({'Project_id',
> $project_id })]);
> die "App $project_id not found!" if !$c->stash->{projects}; #
> This all works fine
>
> # This is a guess and doesn't work ;-)
> $c->session{Project} => $c->stash->{projects}->project_name;
> # Where project_name is an accessor in the DBIx result set.
> }
>
Francisco Obispo
Director of Applications and Services - ISC
email: [email protected]
Phone: +1 650 423 1374 || INOC-DBA *3557* NOC
PGP KeyID = B38DB1BE
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/