Use note.closed? in a consistent way
This commit is contained in:
parent
1d7719e01c
commit
5efe07f164
5 changed files with 5 additions and 5 deletions
|
@ -17,7 +17,7 @@ xml.wpt("lon" => note.lon, "lat" => note.lat) do
|
|||
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
|
||||
|
|
|
@ -18,7 +18,7 @@ json.properties do
|
|||
|
||||
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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
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)
|
||||
|
|
|
@ -12,7 +12,7 @@ xml.note("lon" => note.lon, "lat" => note.lat) do
|
|||
xml.date_created note.created_at
|
||||
xml.status note.status
|
||||
|
||||
if note.status == "closed"
|
||||
if note.closed?
|
||||
xml.date_closed note.closed_at
|
||||
end
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<% @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') %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue