search for: purchasetype_id

Displaying 1 result from an estimated 1 matches for "purchasetype_id".

2009 Apr 05
5
Use a value from a different model
...(params[:search], params[:page], sort_order) end end the saving model (saving - table name = savings): class Saving < ActiveRecord::Base validates_presence_of :supplier, :a_saving, :a_spend, :country_id, :category_id, :subcategory_id, :buyer, :purchaseType_id, validates_numericality_of :a_saving, :a_spend belongs_to :category belongs_to :purchaseType belongs_to :subcategory def self.search(search, page, sort_order) search=''%'' if search=='''' || search==''Type your search term'' paginate :pag...