Sha256: b74d38a3c6325d9911931df93c3fc36bf646252e587250e077d9b68b3e5e865e
Contents?: true
Size: 577 Bytes
Versions: 79
Compression:
Stored size: 577 Bytes
Contents
module Tenon class CommentDecorator < ApplicationDecorator def email @object.author_email end def author_url url = @object.author_url if url.blank? || url.match('http://') || url.match('https://') url else 'http://' + url end end def error_message errors = [] @object.errors.full_messages.each { |error| errors << "<li>#{error}</li>" } "<div class='error-explanation' id='error-explanation'>There were problems with the following fields:<ul>#{errors.join('')}<ul></div>" end end end
Version data entries
79 entries across 79 versions & 1 rubygems