mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
Replace stray error_messages_for uses with working get_list_of_error_messages_for calls
This commit is contained in:
parent
f07a028843
commit
35cc0fceaa
3 changed files with 13 additions and 4 deletions
|
@ -44,4 +44,13 @@ module RecurringTodosHelper
|
|||
def image_tag_for_edit(todo)
|
||||
image_tag("blank.png", :title =>t('todos.edit_action'), :class=>"edit_item", :id=> dom_id(todo, 'edit_icon'))
|
||||
end
|
||||
|
||||
def get_list_of_error_messages_for(model)
|
||||
if model.errors.any?
|
||||
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