summaryrefslogtreecommitdiffstats
path: root/app/controllers/my_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/my_controller.rb')
-rw-r--r--app/controllers/my_controller.rb11
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