summaryrefslogtreecommitdiffstats
path: root/app/controllers/my_controller.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2009-12-21 02:24:49 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2009-12-21 02:24:49 +0000
commite1013c44a3b702a74349c1bc12c86158fe2fdfd9 (patch)
tree1d78ec9f1e119ddf17c095fe36b53e72fb181e08 /app/controllers/my_controller.rb
parentc478fa7f907ea8a0df118dfedfc26f4c1a6d886d (diff)
downloadredmine-e1013c44a3b702a74349c1bc12c86158fe2fdfd9.tar.gz
redmine-e1013c44a3b702a74349c1bc12c86158fe2fdfd9.zip
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
Diffstat (limited to 'app/controllers/my_controller.rb')
-rw-r--r--app/controllers/my_controller.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index da34418f8..64687d87e 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -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'