]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/redactions_controller.rb
Use current_user to represent the currently logged in user.
[rails.git] / app / controllers / redactions_controller.rb
index 31dd7273f114d2ff217961830c7d80c29ecc41cb..f15060d5b596d2ca62be7fc0c0334e7a25e706a3 100644 (file)
@@ -19,7 +19,7 @@ class RedactionsController < ApplicationController
 
   def create
     @redaction = Redaction.new
-    @redaction.user = @user
+    @redaction.user = current_user
     @redaction.title = params[:redaction][:title]
     @redaction.description = params[:redaction][:description]
     # note that the description format will default to 'markdown'
@@ -32,11 +32,9 @@ class RedactionsController < ApplicationController
     end
   end
 
-  def show
-  end
+  def show; end
 
-  def edit
-  end
+  def edit; end
 
   def update
     # note - don't update the user ID