]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/diary_entry_controller.rb
More unit tests for the parsing of the Node.from_xml. Some code clean up to ensure...
[rails.git] / app / controllers / diary_entry_controller.rb
index 388df43fe6dc161c2eacee0e22d242e0e15b325f..16186314fe94d44facc26b5f16caac32324e2858 100644 (file)
@@ -32,8 +32,6 @@ class DiaryEntryController < ApplicationController
     if @user != @diary_entry.user
       redirect_to :controller => 'diary_entry', :action => 'view', :id => params[:id]
     elsif params[:diary_entry]
-      params[:diary_entry][:language] = Language.find_by_code(params[:diary_entry][:language])
-      params[:diary_entry][:language] = Language.find_by_code("en") if params[:diary_entry][:language].nil?
       if @diary_entry.update_attributes(params[:diary_entry])
         redirect_to :controller => 'diary_entry', :action => 'view', :id => params[:id]
       end
@@ -65,6 +63,7 @@ class DiaryEntryController < ApplicationController
                                           :order => 'created_at DESC',
                                           :per_page => 20)
       else
+        @title = t'diary_entry.no_such_user.title'
         @not_found_user = params[:display_name]
 
         render :action => 'no_such_user', :status => :not_found