SHIMADA Koji
null+****@clear*****
Sun Sep 30 19:04:31 JST 2012
SHIMADA Koji 2012-09-30 19:04:31 +0900 (Sun, 30 Sep 2012) New Revision: b641f78dd8a5770b4dca0f9fb09bb783b9cfc58a https://github.com/logaling/logaling-server/commit/b641f78dd8a5770b4dca0f9fb09bb783b9cfc58a Log: Move #github_project? to AdditionalInformationAsSearchResults Modified files: app/helpers/application_helper.rb app/models/additional_information_as_search_results.rb app/views/shared/_term.html.haml Modified: app/helpers/application_helper.rb (+0 -5) =================================================================== --- app/helpers/application_helper.rb 2012-09-30 19:03:19 +0900 (fe43ecc) +++ app/helpers/application_helper.rb 2012-09-30 19:04:31 +0900 (f23f5ec) @@ -11,10 +11,6 @@ module ApplicationHelper raw(buffer) end - def github_project?(glossary_name) - glossary_name =~ /^github/ - end - def count_of_starting_position(per_count, current_page) per_count * (current_page - 1) + 1 end @@ -22,5 +18,4 @@ module ApplicationHelper def count_of_end_position(per_count, current_page, page_count) per_count * (current_page - 1) + page_count end - end Modified: app/models/additional_information_as_search_results.rb (+4 -0) =================================================================== --- app/models/additional_information_as_search_results.rb 2012-09-30 19:03:19 +0900 (c98540a) +++ app/models/additional_information_as_search_results.rb 2012-09-30 19:04:31 +0900 (20e30ce) @@ -5,6 +5,10 @@ module AdditionalInformationAsSearchResults attr_accessor :target_language attr_accessor :snipped_source_term + def github_project? + glossary_name =~ /^github/ + end + def split_glossary_name_to_user_id_and_name glossary_name.split("-", 2) end Modified: app/views/shared/_term.html.haml (+1 -1) =================================================================== --- app/views/shared/_term.html.haml 2012-09-30 19:03:19 +0900 (aa6ff34) +++ app/views/shared/_term.html.haml 2012-09-30 19:04:31 +0900 (1bd5bd2) @@ -12,7 +12,7 @@ = "note" = term.note .span2.property - - if github_project?(term.glossary_name) + - if term.github_project? %p.githubProject = link_to term.glossary_name_without_github, '#' - else -------------- next part -------------- An HTML attachment was scrubbed... ダウンロード