Last active
December 11, 2015 06:18
-
-
Save excid3/4558091 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def index | |
@calls = Call.report(params[:search]) | |
respond_to do |format| | |
format.html do | |
@calls.paginate(:per_page => 10, :page => params[:page]) | |
end | |
format.csv { send_data @calls.to_csv } | |
format.xls { send_data @calls.to_csv(col_sep: "\t") } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
def index
@Calls = Call.report(params[:search])
respond_to do |format|
format.html do
@Calls = Call.report(params[:search]).paginate(:per_page => 10, :page => params[:page])
end
format.csv { send_data @calls.to_csv }
format.xls { send_data @calls.to_csv(col_sep: "\t") }
end
end