mirror of
https://github.com/TracksApp/tracks.git
synced 2026-04-18 01:59:02 +02:00
Fixes #266 git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@239 a4c988fc-2ded-0310-b66e-134b36920a42
18 lines
No EOL
323 B
Ruby
18 lines
No EOL
323 B
Ruby
module LoginHelper
|
|
|
|
|
|
def render_errors(obj)
|
|
return "" unless obj
|
|
return "" unless request.post?
|
|
tag = String.new
|
|
|
|
unless obj.valid?
|
|
tag << %{<ul class="objerrors">}
|
|
obj.errors.each_full { |message| tag << %{<li>#{message}</li>} }
|
|
tag << %{</ul>}
|
|
end
|
|
tag
|
|
end
|
|
|
|
|
|
end |