Make sure the RSS token is getting destroyed and created.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3210 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2009-12-21 02:24:49 +00:00
parent c478fa7f90
commit e1013c44a3
2 changed files with 40 additions and 2 deletions
+6 -2
View File
@@ -97,8 +97,12 @@ class MyController < ApplicationController
# Create a new feeds key
def reset_rss_key
if request.post? && User.current.rss_token
User.current.rss_token.destroy
if request.post?
if User.current.rss_token
User.current.rss_token.destroy
User.current.reload
end
User.current.rss_key
flash[:notice] = l(:notice_feeds_access_key_reseted)
end
redirect_to :action => 'account'