earnings_controller.rb 353 Bytes
Newer Older
1
2

class EarningsController < ApplicationController
3

4
5
  before_filter :set_earning, :only => [:cancel]

6

7
8
  # TODO user should be set
  def cancel
surma Lodur's avatar
surma Lodur committed
9
    @earning.cancel!(current_hacker)
10
11
12
13
    redirect_to :back
  end


14
15
16
17
  #################
  ##  Protected  ##
  #################

18
19
20
21
22
23
  protected

  def set_earning
    @earning = Earning.find(params[:id])
  end
end