<div>
<% description.comments.each do |comment| -%>
<div class="note-comment" style="margin-top: 5px">
- <% if comment.author.nil> -%>
+ <% if comment.author.nil? -%>
<div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at", :when => friendly_date(comment.created_at) %></div>
<% else -%>
<div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at_by", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div>
--- /dev/null
+#
+# Make :formats work when rendering one partial from another
+#
+# Taken from https://github.com/rails/rails/pull/6626
+#
+module ActionView
+ class AbstractRenderer #:nodoc:
+ def prepend_formats(formats)
+ formats = Array(formats)
+ return if formats.empty?
+ @lookup_context.formats = formats | @lookup_context.formats
+ end
+ end
+
+ class PartialRenderer
+ def setup_with_formats(context, options, block)
+ prepend_formats(options[:formats])
+ setup_without_formats(context, options, block)
+ end
+
+ alias_method_chain :setup, :formats
+ end
+
+ class TemplateRenderer
+ def render_with_formats(context, options)
+ prepend_formats(options[:formats])
+ render_without_formats(context, options)
+ end
+
+ alias_method_chain :render, :formats
+ end
+end
module Nominatim
+ extend ActionView::Helpers::NumberHelper
+
def self.describe_location(lat, lon, zoom = nil, language = nil)
zoom = zoom || 14
language = language || request.user_preferred_languages.join(',')