aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-05-15 09:52:11 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-05-15 09:52:11 +0100
commit014c5a221a3ac47d89de71cfd81054f39ac3759d (patch)
tree681a31d37b695daa1a008f69c51678874f37f8f4 /app/helpers/application_helper.rb
parent5180e822f8a9016d801282b2df56f7adab99e72f (diff)
Remove trailing whitespace (to make a cleaner forthcoming merge with wombleton:feature/440_sparkly_admin_css)
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a0f16dfaf..df89a372c 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -32,14 +32,14 @@ module ApplicationHelper
html[key] = 'errorExplanation'
end
end
-
+
error_messages = []
for object in objects
object.errors.each do |attr, message|
error_messages << content_tag(:li, message)
end
end
-
+
content_tag(:div,
content_tag(:ul, error_messages),
html
@@ -48,7 +48,7 @@ module ApplicationHelper
''
end
end
-
+
# Highlight words, also escapes HTML (other than spans that we add)
def highlight_words(t, words, html = true)
if html
@@ -70,10 +70,10 @@ module ApplicationHelper
t = highlight_words(t, words, html)
return t
end
-
+
def locale_name(locale)
return LanguageNames::get_language_name(locale)
- end
+ end
# Use our own algorithm for finding path of cache
def foi_cache(name = {}, options = nil, &block)
@@ -100,11 +100,11 @@ module ApplicationHelper
def sanitized_object_name(object_name)
object_name.gsub(/\]\[|[^-a-zA-Z0-9:.]/,"_").sub(/_$/,"")
end
-
+
def sanitized_method_name(method_name)
method_name.sub(/\?$/, "")
end
-
+
def form_tag_id(object_name, method_name, locale=nil)
if locale.nil?
return "#{sanitized_object_name(object_name.to_s)}_#{sanitized_method_name(method_name.to_s)}"