Skip to content

Commit

Permalink
comments: use relative URLs for comment forms.
Browse files Browse the repository at this point in the history
Using full, absoltue URLs will cause testing environment to comment on
production instances, and will also break HTTPS support on
mixed-protocols sites.
  • Loading branch information
Flameeyes committed Feb 17, 2013
1 parent 49f5cc1 commit f28c8b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/article.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ def trackback_url
end

def comment_url
blog.url_for("comments?article_id=#{self.id}", :only_path => false)
blog.url_for("comments?article_id=#{self.id}", :only_path => true)
end

def preview_comment_url
blog.url_for("comments/preview?article_id=#{self.id}", :only_path => false)
blog.url_for("comments/preview?article_id=#{self.id}", :only_path => true)
end

def feed_url(format)
Expand Down

0 comments on commit f28c8b6

Please sign in to comment.