[logaling-commit] logaling/logaling-server [github-project-related-to-user] Set @user_config from relation of current_user

アーカイブの一覧に戻る

SHIMADA Koji null+****@clear*****
Tue Sep 25 19:04:33 JST 2012


SHIMADA Koji	2012-09-25 19:04:33 +0900 (Tue, 25 Sep 2012)

  New Revision: e0ea9b10f0bd40842f4bf4f172a379160f1ed26b
  https://github.com/logaling/logaling-server/commit/e0ea9b10f0bd40842f4bf4f172a379160f1ed26b

  Merged 971b851: Merge pull request #14 from logaling/prioritize-the-search

  Log:
    Set @user_config from relation of current_user

  Modified files:
    app/controllers/dashboard_controller.rb

  Modified: app/controllers/dashboard_controller.rb (+1 -1)
===================================================================
--- app/controllers/dashboard_controller.rb    2012-09-25 15:22:01 +0900 (9fb3a23)
+++ app/controllers/dashboard_controller.rb    2012-09-25 19:04:33 +0900 (80c4512)
@@ -2,7 +2,7 @@ class DashboardController < ApplicationController
   before_filter :authenticate!
 
   def show
-    @user_config = UserConfig.find_by_user_id(current_user.id) || UserConfig.new
+    @user_config = current_user.user_config || UserConfig.new
     @user_glossaries = UserGlossary.find_all_by_user_id(current_user.id)
   end
 end
-------------- next part --------------
An HTML attachment was scrubbed...
ダウンロード 



More information about the logaling-commit mailing list
アーカイブの一覧に戻る