]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/diary_entry_controller.rb
Replace deprecated ActiveModel::Errors get/set methods
[rails.git] / app / controllers / diary_entry_controller.rb
index 6fb255a36fc481dab4711ec2da7f75d5e5f70463..19bc84ac785e6e8193235784ab1eb65f38588911 100644 (file)
@@ -128,7 +128,7 @@ class DiaryEntryController < ApplicationController
         return
       end
     else
-      @entries = DiaryEntry.joins(:user).where(:users => { :status => %w(active confirmed) })
+      @entries = DiaryEntry.joins(:user).where(:users => { :status => %w[active confirmed] })
 
       if params[:language]
         @title = t "diary_entry.list.in_language_title", :language => Language.find(params[:language]).english_name
@@ -158,11 +158,11 @@ class DiaryEntryController < ApplicationController
         @description = I18n.t("diary_entry.feed.user.description", :user => user.display_name)
         @link = "http://#{SERVER_URL}/user/#{user.display_name}/diary"
       else
-        render :text => "", :status => :not_found
+        head :not_found
         return
       end
     else
-      @entries = DiaryEntry.joins(:user).where(:users => { :status => %w(active confirmed) })
+      @entries = DiaryEntry.joins(:user).where(:users => { :status => %w[active confirmed] })
 
       if params[:language]
         @entries = @entries.where(:language_code => params[:language])