SUZUKI Miho
null+****@clear*****
Fri Sep 21 20:07:46 JST 2012
SUZUKI Miho 2012-09-21 20:07:46 +0900 (Fri, 21 Sep 2012) New Revision: ec397001c697e710e7fbcaa651c54b9f9be7ee16 https://github.com/logaling/logaling-server/commit/ec397001c697e710e7fbcaa651c54b9f9be7ee16 Log: Do not use #to_param because of some pages use UserGlossary.id Modified files: app/models/user_glossary.rb app/views/dashboard/show.html.haml Modified: app/models/user_glossary.rb (+1 -1) =================================================================== --- app/models/user_glossary.rb 2012-09-21 19:05:26 +0900 (6fa2ad5) +++ app/models/user_glossary.rb 2012-09-21 20:07:46 +0900 (ef520ea) @@ -13,7 +13,7 @@ class UserGlossary < ActiveRecord::Base "%05d-%s" % [user_id, name] end - def to_param + def config_key "%s.%s.%s" % [name, source_language, target_language] end Modified: app/views/dashboard/show.html.haml (+2 -2) =================================================================== --- app/views/dashboard/show.html.haml 2012-09-21 19:05:26 +0900 (44d0f06) +++ app/views/dashboard/show.html.haml 2012-09-21 20:07:46 +0900 (f72e528) @@ -8,5 +8,5 @@ = user_glossary.glossary_name = user_glossary.source_language = user_glossary.target_language - = link_to "Show", user_glossary_path(current_user, user_glossary.id) - = link_to "☆", user_config_path(current_user, user_glossary.to_param), method: :put + = link_to "Show", user_glossary_path(current_user, user_glossary) + = link_to "☆", user_config_path(current_user, user_glossary.config_key), method: :put -------------- next part -------------- An HTML attachment was scrubbed... 下載