]> git.openstreetmap.org Git - rails.git/commitdiff
Fix new rubocop warnings
authorTom Hughes <tom@compton.nu>
Tue, 14 Jun 2022 18:04:39 +0000 (19:04 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 14 Jun 2022 18:04:39 +0000 (19:04 +0100)
app/views/api/notes/_note.gpx.builder
app/views/api/notes/_note.rss.builder
app/views/api/notes/feed.rss.builder
app/views/changeset_comments/_comments.rss.builder
app/views/diary_entries/rss.rss.builder
app/views/traces/georss.rss.builder
test/controllers/api/notes_controller_test.rb

index 74961b2e058649d0ad1fea32e0a95f2e721960a8..c79ed6a6e762db44eb76d521417384091cae36c4 100644 (file)
@@ -1,5 +1,5 @@
 xml.wpt("lon" => note.lon, "lat" => note.lat) do
-  xml.time note.created_at.to_formatted_s(:iso8601)
+  xml.time note.created_at.to_fs(:iso8601)
   xml.name t("browse.note.title", :id => note.id)
 
   xml.desc do
index 3e562d1a20365ea0aee61961743b033489bcd0ee..968b4dc672363e0c82835e19a60f46717a9cca33 100644 (file)
@@ -15,7 +15,7 @@ xml.item do
 
   xml.dc :creator, note.author.display_name if note.author
 
-  xml.pubDate note.created_at.to_formatted_s(:rfc822)
+  xml.pubDate note.created_at.to_fs(:rfc822)
   xml.geo :lat, note.lat
   xml.geo :long, note.lon
   xml.georss :point, "#{note.lat} #{note.lon}"
index f0d00470beffd9a1ba8ca9be6618e9ed191064f5..89f888f5bdaa18c6f1695e5aa5954834688d83e8 100644 (file)
@@ -24,7 +24,7 @@ xml.rss("version" => "2.0",
 
         xml.dc :creator, comment.author.display_name if comment.author
 
-        xml.pubDate comment.created_at.to_formatted_s(:rfc822)
+        xml.pubDate comment.created_at.to_fs(:rfc822)
         xml.geo :lat, comment.note.lat
         xml.geo :long, comment.note.lon
         xml.georss :point, "#{comment.note.lat} #{comment.note.lon}"
index 4136b24b492e94438f2f9ce3c0ad2746141853bb..59973965f617ac0972c834c3d4c0a35d7e253d7d 100644 (file)
@@ -11,6 +11,6 @@ comments.each do |comment|
 
     xml.dc :creator, comment.author.display_name if comment.author
 
-    xml.pubDate comment.created_at.to_formatted_s(:rfc822)
+    xml.pubDate comment.created_at.to_fs(:rfc822)
   end
 end
index 06361c49ede8d353d537231f452a64ad99fa9b73..2fec0e5e596bea6b40e193c30cfd8c61bbe62ff9 100644 (file)
@@ -23,7 +23,7 @@ xml.rss("version" => "2.0",
         xml.guid diary_entry_url(entry.user, entry, :only_path => false)
         xml.description entry.body.to_html
         xml.dc :creator, entry.user.display_name
-        xml.pubDate entry.created_at.to_formatted_s(:rfc822)
+        xml.pubDate entry.created_at.to_fs(:rfc822)
         xml.comments diary_entry_url(entry.user, entry, :anchor => "comments", :only_path => false)
 
         if entry.latitude && entry.longitude
index 991f74ebbf194b173f17b256615d74ae9f25868c..36641fec0b4e2f14c8f7191f0be3f084655840de 100644 (file)
@@ -30,7 +30,7 @@ xml.rss("version" => "2.0",
 
         xml.dc :creator, trace.user.display_name
 
-        xml.pubDate trace.timestamp.to_formatted_s(:rfc822)
+        xml.pubDate trace.timestamp.to_fs(:rfc822)
 
         if trace.latitude && trace.longitude
           xml.geo :lat, trace.latitude
index 7dbcdc816e8ae965b007e8445a0b5572633c99d4..d6759e192405a3dc9a89f8db6d2b55602a000e96 100644 (file)
@@ -494,7 +494,7 @@ module Api
           assert_select "item", :count => 1 do
             assert_select "link", browse_note_url(open_note)
             assert_select "guid", note_url(open_note)
-            assert_select "pubDate", open_note.created_at.to_formatted_s(:rfc822)
+            assert_select "pubDate", open_note.created_at.to_fs(:rfc822)
             #          assert_select "geo:lat", open_note.lat.to_s
             #          assert_select "geo:long", open_note.lon
             #          assert_select "georss:point", "#{open_note.lon} #{open_note.lon}"