diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-10-30 08:32:31 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-10-30 08:32:31 +0000 |
commit | db5bd2b2de4733b3c900468edf4eb35896e4f723 (patch) | |
tree | d6f86917faf3374f1a878f2566857b57b19852d8 /app/controllers/my_controller.rb | |
parent | f7782c46480f8d5ab995c988ea265d12eb7ad0a9 (diff) | |
download | redmine-db5bd2b2de4733b3c900468edf4eb35896e4f723.tar.gz redmine-db5bd2b2de4733b3c900468edf4eb35896e4f723.zip |
My page - Spent time: configurable number of days to display (#8761).
git-svn-id: http://svn.redmine.org/redmine/trunk@15942 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/my_controller.rb')
-rw-r--r-- | app/controllers/my_controller.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index a01d4e0ea..5cf677a2d 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -130,6 +130,17 @@ class MyController < ApplicationController redirect_to my_account_path end + def update_page + @user = User.current + block_settings = params[:settings] || {} + + block_settings.each do |block, settings| + @user.pref.update_block_settings(block, settings) + end + @user.pref.save + @updated_blocks = block_settings.keys + end + # User's page layout configuration def page_layout @user = User.current |