Displaying 1 result from an estimated 1 matches for "salebatchcode".
2007 Nov 19
2
Help with controller and view
...he controller
class TraceabilitiesController < ApplicationController
  def index
      if  (params[:BakeryOutput].nil? )
         @traceabilities = BakeryOutput.find(:all,:include => [:recipe,
:customer])
      else
        @traceabilities = BakeryOutput.find(:all, :conditions =>
["salebatchcode LIKE ?", "%#{params[:BakeryOutput] [:salebatchcode]}%"],
:include => [:recipe, :customer])
      end
      respond_to do |format|
        format.html # index.rhtml
        format.xml  { render :xml => @traceabilities.to_xml }
      end
  end
  def show
     @bakery_output = B...