mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
applied patch of Dan Rice to fix #1326. Thanks Dan!
This commit is contained in:
parent
1cdf6c8b8e
commit
be26cfdd66
1 changed files with 4 additions and 4 deletions
|
|
@ -251,10 +251,10 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_list_of_error_messages_for(model)
|
def get_list_of_error_messages_for(model)
|
||||||
error_messages = ""
|
|
||||||
if model.errors.any?
|
if model.errors.any?
|
||||||
list_of_messages = model.errors.full_messages.inject("") { |all, msg| all += content_tag(:li, msg) }
|
content_tag(:ul) do
|
||||||
error_messages = content_tag(:ul, list_of_messages)
|
model.errors.full_messages.collect { |msg| concat(content_tag(:li, msg)) }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue