2011-07-29 20:05:47 +02:00
|
|
|
class PrefsController < ApplicationController
|
|
|
|
|
|
|
|
before_filter :check_current_user,:selected_folder
|
|
|
|
|
2011-08-16 20:05:58 +02:00
|
|
|
before_filter :get_current_folders
|
|
|
|
|
|
|
|
before_filter :get_prefs
|
2011-07-31 22:45:29 +02:00
|
|
|
|
2011-07-29 20:05:47 +02:00
|
|
|
theme :theme_resolver
|
|
|
|
|
|
|
|
def index
|
2011-08-16 20:05:58 +02:00
|
|
|
end
|
2011-08-02 23:12:17 +02:00
|
|
|
|
2011-08-16 20:05:58 +02:00
|
|
|
def update
|
|
|
|
if params[:prefs]
|
|
|
|
@prefs.update_attributes(params[:prefs])
|
|
|
|
end
|
|
|
|
redirect_to :action => 'index'
|
2011-07-29 20:05:47 +02:00
|
|
|
end
|
|
|
|
|
2011-08-16 20:05:58 +02:00
|
|
|
############################################ private section #########################################
|
|
|
|
|
|
|
|
def get_prefs
|
|
|
|
@prefs = @current_user.prefs
|
|
|
|
end
|
2011-07-29 20:05:47 +02:00
|
|
|
end
|