SUZUKI Miho
null+****@clear*****
Fri Sep 21 23:21:20 JST 2012
SUZUKI Miho 2012-09-21 23:21:20 +0900 (Fri, 21 Sep 2012) New Revision: 7f829567691c747dcb3112e0eb70e5b88a47f16f https://github.com/logaling/logaling-server/commit/7f829567691c747dcb3112e0eb70e5b88a47f16f Merged 971b851: Merge pull request #14 from logaling/prioritize-the-search Log: Set glossary when search for prioritize search Modified files: app/controllers/search_controller.rb Modified: app/controllers/search_controller.rb (+15 -1) =================================================================== --- app/controllers/search_controller.rb 2012-09-21 23:20:47 +0900 (de8671b) +++ app/controllers/search_controller.rb 2012-09-21 23:21:20 +0900 (d6c12fe) @@ -2,6 +2,20 @@ class SearchController < ApplicationController def index @query = params[:query] - @terms = LogalingServer.repository.lookup(@query, nil) + @terms = LogalingServer.repository.lookup(@query, glossary) + logge****@terms***** + end + + private + def glossary + user_config = signed_in? ? UserConfig.find_by_user_id(current_user.id) : nil + if user_config + LogalingServer.repository.find_glossary( + user_config.glossary, + user_config.source_language, + user_config.target_language) + else + nil + end end end -------------- next part -------------- An HTML attachment was scrubbed... Download