Mercurial > zeropaste
annotate app/helpers/application_helper.rb @ 416:c4c8214fb0b2
Simplify dom check
author | nanaya <me@myconan.net> |
---|---|
date | Mon, 14 Sep 2015 14:48:36 +0900 |
parents | 851432f21603 |
children | d31fe32da7a0 |
rev | line source |
---|---|
0 | 1 module ApplicationHelper |
26 | 2 def html_title |
331 | 3 base_title = "Zeropaste" |
26 | 4 if content_for? :title |
5 "#{content_for(:title)} | #{h base_title}".html_safe | |
6 else | |
7 base_title | |
8 end | |
9 end | |
398 | 10 |
11 def error_class(object, attribute) | |
12 "has-error" if object.errors.include? attribute | |
13 end | |
0 | 14 end |