Class: Tenon::ContactDecorator
Instance Method Summary
collapse
#delete_link, #edit_link, #edit_path, #path, #published?
Instance Method Details
#error_message ⇒ Object
7
8
9
10
11
|
# File 'app/decorators/tenon/contact_decorator.rb', line 7
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
|
#sent_date ⇒ Object
3
4
5
|
# File 'app/decorators/tenon/contact_decorator.rb', line 3
def sent_date
@object.created_at.strftime('%B %e, %Y at %l:%M %p')
end
|