Class: Admix::VouchersController

Inherits:
InheritedController
  • Object
show all
Defined in:
app/controllers/admix/vouchers_controller.rb

Instance Method Summary collapse

Instance Method Details

#delete_userObject



14
15
16
17
# File 'app/controllers/admix/vouchers_controller.rb', line 14

def delete_user
  @voucher.users.find(params[:user_id]).delete
  redirect_to admix_voucher_users_url
end


5
6
7
8
# File 'app/controllers/admix/vouchers_controller.rb', line 5

def print
  @users = @voucher.users.where(confirmed: true).order_by(name: 1)
  render layout: false
end

#usersObject



10
11
12
# File 'app/controllers/admix/vouchers_controller.rb', line 10

def users
  @users = @voucher.users.order_by(confirmed: -1, name: 1)
end