Episodes

wade0727
Joined 4/6/2019
wade0727 said over 3 years ago on DataTables :
Great video, thank you. Would you mind giving me an example on how to add the PDF and Excel options to export table data?

wade0727 said over 3 years ago on DataTables :
Well, I've managed to get the buttons to show up. I just had to adjust the DOM property with BLfrtip. ``` dom: 'Blfrtip', buttons: [ 'copy', 'csv', 'excel', 'pdf', 'print' ] ```

wade0727 said about 3 years ago on Importing and Exporting CSV Data :
What's the best approach to this using the Kaminari Gem so that I can pull all rows in the index, not just the amount listed on the first page? ``` def index search = params[:term].present? ? params[:term] : nil @nodes = if search Node.search(search) else Node.order(:node).page(params[:page]) end respond_to do |format| format.html format.csv { send_data @nodes.to_csv, filename: "nodes-#{Date.today}.csv" } end end ```

wade0727 said about 3 years ago on Importing and Exporting CSV Data :
Wow, that was easier than I thought it was going to be. Thank you!! :)