]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/redactions_controller.rb
Localisation updates from https://translatewiki.net.
[rails.git] / app / controllers / redactions_controller.rb
index beff596a040a7aeb5f422abbc4ab60d9660354c9..f15060d5b596d2ca62be7fc0c0334e7a25e706a3 100644 (file)
@@ -1,13 +1,13 @@
 class RedactionsController < ApplicationController
   layout "site"
 
-  before_filter :authorize_web
-  before_filter :set_locale
-  before_filter :require_user, :only => [:new, :create, :edit, :update, :destroy]
-  before_filter :require_moderator, :only => [:new, :create, :edit, :update, :destroy]
-  before_filter :lookup_redaction, :only => [:show, :edit, :update, :destroy]
-  before_filter :check_database_readable
-  before_filter :check_database_writable, :only => [:create, :update, :destroy]
+  before_action :authorize_web
+  before_action :set_locale
+  before_action :require_user, :only => [:new, :create, :edit, :update, :destroy]
+  before_action :require_moderator, :only => [:new, :create, :edit, :update, :destroy]
+  before_action :lookup_redaction, :only => [:show, :edit, :update, :destroy]
+  before_action :check_database_readable
+  before_action :check_database_writable, :only => [:create, :update, :destroy]
 
   def index
     @redactions = Redaction.order(:id)
@@ -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