Sha256: 597f8f0fffa56d0887f9aac94b732a0acb08f5fea34423b446686aba76961ff1

Contents?: true

Size: 428 Bytes

Versions: 79

Compression:

Stored size: 428 Bytes

Contents

module Tenon
  class ContactDecorator < ApplicationDecorator
    def sent_date
      @object.created_at.strftime('%B %e, %Y at %l:%M %p')
    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

Version Path
tenon-1.1.4 app/decorators/tenon/contact_decorator.rb
tenon-1.1.3 app/decorators/tenon/contact_decorator.rb
tenon-1.1.2 app/decorators/tenon/contact_decorator.rb
tenon-1.1.1 app/decorators/tenon/contact_decorator.rb
tenon-1.0.76 app/decorators/tenon/contact_decorator.rb
tenon-1.0.75 app/decorators/tenon/contact_decorator.rb
tenon-1.0.74 app/decorators/tenon/contact_decorator.rb
tenon-1.0.73 app/decorators/tenon/contact_decorator.rb
tenon-1.0.72 app/decorators/tenon/contact_decorator.rb
tenon-1.0.71 app/decorators/tenon/contact_decorator.rb
tenon-1.0.70 app/decorators/tenon/contact_decorator.rb
tenon-1.0.69 app/decorators/tenon/contact_decorator.rb
tenon-1.0.68 app/decorators/tenon/contact_decorator.rb
tenon-1.0.67 app/decorators/tenon/contact_decorator.rb
tenon-1.0.66 app/decorators/tenon/contact_decorator.rb
tenon-1.0.65 app/decorators/tenon/contact_decorator.rb
tenon-1.0.64 app/decorators/tenon/contact_decorator.rb
tenon-1.0.63 app/decorators/tenon/contact_decorator.rb
tenon-1.0.62 app/decorators/tenon/contact_decorator.rb
tenon-1.0.61 app/decorators/tenon/contact_decorator.rb