Commit 782125ed authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻 Committed by Kaspar
Browse files

better format in action

parent 912f9805
......@@ -11,12 +11,11 @@ class VolunteersController < ApplicationController
authorize Volunteer
@q = Volunteer.ransack(params[:q])
respond_to do |format|
if params[:format] == 'xlsx'
format.xlsx do
@volunteers = @q.result
format.xlsx
else
end
format.html do
@volunteers = @q.result.paginate(page: params[:page])
format.html
end
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment