Skip to content

Commit

Permalink
Fix comment fields saving in cookies.
Browse files Browse the repository at this point in the history
Instead of saving the md5 of the email actually save the email, and make also sure that the path is set properly.
  • Loading branch information
Flameeyes committed Nov 7, 2013
1 parent 214d860 commit eeaab41
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/controllers/comments_controller.rb
Expand Up @@ -78,11 +78,9 @@ def set_headers
end

def set_cookies_for comment
add_to_cookies(:author, comment.author)
add_to_cookies(:url, comment.url)
if ! comment.email.blank?
add_to_cookies(:gravatar_id, Digest::MD5.hexdigest(comment.email.strip))
end
add_to_cookies(:author, comment.author, '/')
add_to_cookies(:url, comment.url, '/')
add_to_cookies(:email, comment.email.strip, '/')
end

def get_article
Expand Down

0 comments on commit eeaab41

Please sign in to comment.