mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02: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,11 +251,11 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def get_list_of_error_messages_for(model)
|
||||
error_messages = ""
|
||||
if model.errors.any?
|
||||
list_of_messages = model.errors.full_messages.inject("") { |all, msg| all += content_tag(:li, msg) }
|
||||
error_messages = content_tag(:ul, list_of_messages)
|
||||
content_tag(:ul) do
|
||||
model.errors.full_messages.collect { |msg| concat(content_tag(:li, msg)) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue