Skip to content

Commit

Permalink
Update the result of uri() to point to the new endpoints
Browse files Browse the repository at this point in the history
These methods then need to be used in the templates to generate the correct links.
  • Loading branch information
book committed May 27, 2016
1 parent 5d10f7c commit 63f104b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/PearlBee/Model/Schema/Result/Category.pm
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ sub safe_cascade_delete {
}

sub uri {
'/posts/category/' . $_[0]->slug . ( $PearlBee::is_static && '.html ' );
'/category/' . $_[0]->slug . ( $PearlBee::is_static && '.html ' );
}

sub edit_uri { '/dashboard/categories/edit/' . $_[0]->id }
Expand Down
2 changes: 1 addition & 1 deletion lib/PearlBee/Model/Schema/Result/Tag.pm
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ __PACKAGE__->many_to_many( "posts", "post_tags", "post" );

# You can replace this text with custom code or comments, and it will be preserved on regeneration

sub uri { '/posts/tag/' . $_[0]->slug . ( $PearlBee::is_static && '.html ' ) }
sub uri { '/tag/' . $_[0]->slug . ( $PearlBee::is_static && '.html ' ) }

sub edit_uri { '/dashboard/tags/edit/' . $_[0]->id }

Expand Down
2 changes: 1 addition & 1 deletion lib/PearlBee/Model/Schema/Result/User.pm
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ sub allow {
}

sub uri {
'/posts/user/' . $_[0]->username . ( $PearlBee::is_static && '.html ' );
'/author/' . $_[0]->username . ( $PearlBee::is_static && '.html ' );
}

1;

0 comments on commit 63f104b

Please # to comment.