From f517b3a4224147824fb7b5e645063270b75412c6 Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Thu, 29 May 2014 23:18:18 +0200 Subject: [PATCH] Fix whitespace in (Rails) helpers Signed-off-by: Alex Coles --- app/helpers/application_helper.rb | 2 +- app/helpers/query_menu_items_helper.rb | 2 +- app/helpers/sort_helper.rb | 1 - app/helpers/timelog_helper.rb | 6 +++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f2a6b03556..9298148d4c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -227,7 +227,7 @@ module ApplicationHelper def format_version_name(version) if version.project == @project - h(version) + h(version) else h("#{version.project} - #{version}") end diff --git a/app/helpers/query_menu_items_helper.rb b/app/helpers/query_menu_items_helper.rb index 230c2835ca..32675baac1 100644 --- a/app/helpers/query_menu_items_helper.rb +++ b/app/helpers/query_menu_items_helper.rb @@ -31,4 +31,4 @@ module QueryMenuItemsHelper def update_query_menu_item_path(project, query_menu_item) query_menu_item.persisted? ? query_menu_item_path(project, query_menu_item.query, query_menu_item) : query_menu_items_path(project, query_menu_item.query) end -end \ No newline at end of file +end diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb index f677b9f91d..ca289d99dd 100644 --- a/app/helpers/sort_helper.rb +++ b/app/helpers/sort_helper.rb @@ -265,4 +265,3 @@ module SortHelper content_tag('th', sort_link(column, caption, default_order, :lang => lang), options) end end - diff --git a/app/helpers/timelog_helper.rb b/app/helpers/timelog_helper.rb index f415ee83b1..33db9a77d1 100644 --- a/app/helpers/timelog_helper.rb +++ b/app/helpers/timelog_helper.rb @@ -67,10 +67,10 @@ module TimelogHelper end def select_hours(data, criteria, value) - if value.to_s.empty? - data.select {|row| row[criteria].blank? } + if value.to_s.empty? + data.select {|row| row[criteria].blank? } else - data.select {|row| row[criteria].to_s == value.to_s} + data.select {|row| row[criteria].to_s == value.to_s} end end