Sha256: 42768e674a1698f409bb79587588c454b8c16a2f9b9ff2a255001bef084a8fce
Contents?: true
Size: 576 Bytes
Versions: 11
Compression:
Stored size: 576 Bytes
Contents
class Admin::Muck::OrdersController < Admin::Muck::BaseController unloadable def index respond_to do |format| format.html do @orders = Order.newest.paginate(:page => @page, :per_page => @per_page, :include => [:user]) end format.csv do @orders = Order.find(:all, :include => [:user]) headers["Content-Type"] = 'text/csv' headers["Content-Disposition"] = "attachment; filename=\"orders.csv\"" render :layout => false end end end def show @order = Order.find(params[:id]) end end
Version data entries
11 entries across 11 versions & 1 rubygems