SHIMADA Koji
null+****@clear*****
Mon Sep 10 15:21:52 JST 2012
SHIMADA Koji 2012-09-10 15:21:52 +0900 (Mon, 10 Sep 2012) New Revision: 9da5fba1c1957aaeb90a9b92a21aac4a1775e1dd https://github.com/logaling/logaling-server/commit/9da5fba1c1957aaeb90a9b92a21aac4a1775e1dd Merged c5d082c: Merge pull request #13 from logaling/enable-creating-user-glossary Log: Extract UserGlossary#glossary_name Modified files: app/models/user_glossary.rb Modified: app/models/user_glossary.rb (+5 -1) =================================================================== --- app/models/user_glossary.rb 2012-09-10 15:17:16 +0900 (34f8484) +++ app/models/user_glossary.rb 2012-09-10 15:21:52 +0900 (4180840) @@ -8,11 +8,15 @@ class UserGlossary < ActiveRecord::Base def create #TODO: check dupplication begin - glossary_name = "%05d-%s"%[self.user_id, name] personal_project = LogalingServer.repository.create_personal_project(glossary_name, source_language, target_language) rescue Logaling::GlossaryAlreadyRegistered false end true end + + private + def glossary_name + "%05d-%s"%[self.user_id, name] + end end -------------- next part -------------- An HTML attachment was scrubbed... Download