redemptions_controller.rb 333 Bytes
Newer Older
1
2
3
4
5

class RedemptionsController < ApplicationController
  before_filter :set_redemption, :only => [:cancel]

  def cancel
6
7
8
    if @redemption.cancel!
      flash[:warning] = "#{@redemption.points} storniert"
    end
9
10
11
12
13
14
15
16
17
18

    redirect_to :back
  end

  protected

  def set_redemption
    @redemption = Redemption.find(params[:id])
  end
end