File: app/controllers/info_controller.rb

Overview
Module Structure
Class Hierarchy
Code

Overview

Module Structure

  module: <Toplevel Module>
  class: InfoController#9
inherits from
  ApplicationController   
has properties
method: who_bought #11
method: authorize #23

Class Hierarchy

Code

   1  #---
   2  # Excerpted from "Agile Web Development with Rails, 3rd Ed.",
   3  # published by The Pragmatic Bookshelf.
   4  # Copyrights apply to this code. It may not be used to create training material, 
   5  # courses, books, articles, and the like. Contact us if you are in doubt.
   6  # We make no guarantees that this code is fit for any purpose. 
   7  # Visit http://www.pragmaticprogrammer.com/titles/rails3 for more book information.
   8  #---
   9  class InfoController < ApplicationController
  10    
  11    def who_bought
  12      @product = Product.find(params[:id])
  13      @orders  = @product.orders
  14      respond_to do |format|
  15        format.html
  16        format.xml { render :layout => false }
  17      end
  18    end
  19    
  20 
  21  protected
  22 
  23    def authorize
  24    end
  25  end