Dock change and getting values from db

This commit is contained in:
Harry Bomrah authored and Christophe Vilayphiou committed 2012-04-06 17:49:22 +08:00
1 parent b2c9229099
commit 7309d9c446
145 files changed
+218 -55

No files matched your search

+10 -5
View File
@@ -2,10 +2,11 @@ class DesktopController< ApplicationController
layout 'desktop'
before_filter :authenticate_user!
def index
@desktop = current_user.desktop
end
def desktop
render :layout => false
end
@@ -17,11 +18,15 @@ class DesktopController< ApplicationController
render :layout => false
end
def save_desktop_theme
def save_desktop_settings
Desktop.update_attributes(:theme => params["theme"])
a = Array.new
a << {"success"=>"true"}
render :json=>a.to_json
end
def get_desktop_theme
def get_desktop_settings
@desktop = Desktop.find(params["id"])
render :json => @desktop.to_json
end
end