Skip to content

Commit

Permalink
Merge c40852e into 9f681d6
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbad0c0d3 committed Sep 8, 2016
2 parents 9f681d6 + c40852e commit ece2797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/DBIx/Class/Helper/Row/ToJSON.pm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ sub TO_JSON {
my $columns_info = $self->columns_info($self->serializable_columns);

return {
map +($_ => $self->$_),
map {my $col=$_;$_ => UNIVERSAL::can($self->$_,'columns')?{map +(%{UNIVERSAL::can($self->$col->$_,'TO_JSON')?$self->$col->$_->TO_JSON:{$_,$self->$col->$_}}),$self->$_->columns}:$self->$_}
map +($columns_info->{$_}{accessor} || $_),
keys %$columns_info
};
Expand Down

0 comments on commit ece2797

Please sign in to comment.