85cb7c2057
could probably use a prettier layout and auto-posting a weblog url to the main site (carrying tags)
24 lines
520 B
Ruby
24 lines
520 B
Ruby
module ApplicationHelper
|
|
def errors_for(object, message=nil)
|
|
html = ""
|
|
unless object.errors.blank?
|
|
html << "<div class=\"flash-error\">\n"
|
|
object.errors.full_messages.each do |error|
|
|
html << error << "<br>"
|
|
end
|
|
html << "</div>\n"
|
|
end
|
|
|
|
raw(html)
|
|
end
|
|
|
|
def time_ago_in_words_label(*args)
|
|
label_tag(nil, time_ago_in_words(*args),
|
|
:title => args.first.strftime("%F %T %z"))
|
|
end
|
|
|
|
def main_root_url
|
|
Rails.application.routes.url_helpers.root_url
|
|
end
|
|
end
|