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

Version Path
muck-commerce-0.2.8 app/controllers/admin/muck/orders_controller.rb
muck-commerce-0.2.7 app/controllers/admin/muck/orders_controller.rb
muck-commerce-0.2.6 app/controllers/admin/muck/orders_controller.rb
muck-commerce-0.2.5 app/controllers/admin/muck/orders_controller.rb
muck-commerce-0.2.4 app/controllers/admin/muck/orders_controller.rb
muck-commerce-0.2.3 app/controllers/admin/muck/orders_controller.rb
muck-commerce-0.2.2 app/controllers/admin/muck/orders_controller.rb
muck-commerce-0.2.1 app/controllers/admin/muck/orders_controller.rb
muck-commerce-0.2.0 app/controllers/admin/muck/orders_controller.rb
muck-commerce-0.1.9 app/controllers/admin/muck/orders_controller.rb
muck-commerce-0.1.8 app/controllers/admin/muck/orders_controller.rb