Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Include rating in RSS feed of reviews

  • Loading branch information...
commit bfa3bc0a32c829bdec12f3f82933cdfbd80a058c 1 parent 3d7020d
Dave Rolsky authored December 12, 2012
6  lib/VegGuide/VendorComment.pm
@@ -60,7 +60,11 @@ sub feed_uri {
60 60
 sub feed_template_params {
61 61
     my $self = shift;
62 62
 
63  
-    return ( '/vendor-comment-content.mas', comment => $self );
  63
+    return (
  64
+        '/vendor-comment-content.mas',
  65
+        comment => $self,
  66
+        ( $self->rating() ? ( rating => $self->rating() ) : () ),
  67
+    );
64 68
 }
65 69
 
66 70
 sub delete {
7  share/feed-templates/vendor-comment-content.mas
... ...
@@ -1,5 +1,12 @@
1 1
 <% VegGuide::Util::text_to_html( text => $comment->comment() ) %>
2 2
 
  3
+% if ($rating) {
  4
+<p>
  5
+  Rating: <% $rating %>/5
  6
+</p>
  7
+% }
  8
+
3 9
 <%args>
4 10
 $comment
  11
+$rating => undef
5 12
 </%args>

0 notes on commit bfa3bc0

Please sign in to comment.
Something went wrong with that request. Please try again.