you should be able to use just post_path(@comment.post)  instead of @comment.post.pretty_url,  if you define a to_param method in the model:  `def to_param; pertty_url end`.