xml.date_created note.created_at
xml.status note.status
- if note.status == "closed"
+ if note.closed?
xml.date_closed note.closed_at
end
end
json.date_created note.created_at
json.status note.status
- json.closed_at note.closed_at if note.status == "closed"
+ json.closed_at note.closed_at if note.closed?
json.comments(note.comments) do |comment|
json.date comment.created_at
xml.item do
location = describe_location(note.lat, note.lon, 14, locale)
- if note.status == "closed"
+ if note.closed?
xml.title t('note.rss.closed', :place => location)
elsif note.comments.length > 1
xml.title t('note.rss.comment', :place => location)
xml.date_created note.created_at
xml.status note.status
- if note.status == "closed"
+ if note.closed?
xml.date_closed note.closed_at
end
<% @notes.each do |note| -%>
<tr<% if note.author != @user2 %> class="creator"<% end %>>
<td>
- <% if note.status == "closed" %>
+ <% if note.closed? %>
<%= image_tag("closed_note_marker.png", :alt => 'closed') %>
<% else %>
<%= image_tag("open_note_marker.png", :alt => 'open') %>