]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/diary_entry_controller.rb
Update the postcode code to do a npemap lookup, rather than a FTP one
[rails.git] / app / controllers / diary_entry_controller.rb
index 7c77fc177394280ba823c56a8be2aee9b47b2eb8..c25c8718dced4fab126fea2f8a3e8494146fd01d 100644 (file)
@@ -1,2 +1,16 @@
 class DiaryEntryController < ApplicationController
+  layout 'site'
+  
+  before_filter :authorize_web
+  before_filter :require_user
+
+  def new
+    if params[:diary_entry]     
+      @entry = DiaryEntry.new(@params[:diary_entry])
+      @entry.user = @user
+      if @entry.save 
+        redirect_to :controller => 'user', :action => 'diary', :display_name => @user.display_name 
+      end
+    end
+  end
 end