null+****@clear*****
null+****@clear*****
Thu Jun 28 12:02:33 JST 2012
SHIMADA Koji 2012-06-08 19:14:06 +0900 (Fri, 08 Jun 2012) New Revision: d2317a7eb7a16be139f193ba33ec1a2c4f74352a https://github.com/logaling/logaling-command/commit/d2317a7eb7a16be139f193ba33ec1a2c4f74352a Merged 7228757: Merge pull request #60 from logaling/refactor-structure Log: Move value of order to argument Modified files: lib/logaling/glossary_db.rb Modified: lib/logaling/glossary_db.rb (+3 -3) =================================================================== --- lib/logaling/glossary_db.rb 2012-06-08 18:55:46 +0900 (c99fc3a) +++ lib/logaling/glossary_db.rb 2012-06-08 19:14:06 +0900 (de44add) @@ -153,7 +153,7 @@ module Logaling records_selected.expression.close if records_selected end - def translation_list(glossary_source) + def translation_list(glossary_source, order='ascending') records_raw = Groonga["translations"].select do |record| [ record.glossary == glossary_source.glossary, @@ -163,8 +163,8 @@ module Logaling end records = records_raw.sort([ - {:key=>"source_term", :order=>'ascending'}, - {:key=>"target_term", :order=>'ascending'}]) + {:key=>"source_term", :order=>order}, + {:key=>"target_term", :order=>order}]) struct_result(records) ensure -------------- next part -------------- An HTML attachment was scrubbed... Descargar