2014-12-10 16:17:55 +01:00
|
|
|
require 'csv'
|
|
|
|
class AdminsController < ApplicationController
|
2014-12-15 19:43:02 +01:00
|
|
|
|
2014-12-10 16:17:55 +01:00
|
|
|
def schulden
|
2014-12-15 19:43:02 +01:00
|
|
|
authorize! :schulden, :admins
|
2015-01-06 20:18:01 +01:00
|
|
|
@users = User.members
|
2014-12-10 16:17:55 +01:00
|
|
|
respond_to do |format|
|
|
|
|
format.csv do
|
|
|
|
headers['Content-Disposition'] = "attachment; filename=\"zeus-schulden\""
|
|
|
|
headers['Content-Type'] ||= 'text/csv'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|