X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/eb6b1ae73357d7629b804e086a58e2ad4528b35e..ef7f3d800cbdd49b692df10d312e5fd880e2e938:/app/controllers/redactions_controller.rb diff --git a/app/controllers/redactions_controller.rb b/app/controllers/redactions_controller.rb index d0f902717..b40c83e0d 100644 --- a/app/controllers/redactions_controller.rb +++ b/app/controllers/redactions_controller.rb @@ -1,6 +1,6 @@ class RedactionsController < ApplicationController layout 'site' - + before_filter :authorize_web before_filter :set_locale before_filter :require_user, :only => [:new, :create, :edit, :update, :destroy] @@ -16,7 +16,7 @@ class RedactionsController < ApplicationController def new @redaction = Redaction.new end - + def create @redaction = Redaction.new @redaction.user = @user @@ -31,13 +31,13 @@ class RedactionsController < ApplicationController render :action => 'new' end end - + def show end - + def edit end - + def update # note - don't update the user ID @redaction.title = params[:redaction][:title] @@ -50,11 +50,11 @@ class RedactionsController < ApplicationController render :action => 'edit' end end - + def destroy - unless @redaction.old_nodes.empty? and - @redaction.old_ways.empty? and - @redaction.old_relations.empty? + unless @redaction.old_nodes.empty? && + @redaction.old_ways.empty? && + @redaction.old_relations.empty? flash[:error] = t('redaction.destroy.not_empty') redirect_to @redaction else