search for: find_all_by_amount

Displaying 3 results from an estimated 3 matches for "find_all_by_amount".

2005 Apr 20
7
find_all_by and :order
I think I must be missing something obvious... I have... class OrderController < ApplicationController model :order scaffold :order def list @orders = Order.find_all_by_status(@params[:status], :order => "date" ) end end class Order < ActiveRecord::Base belongs_to :customer end and i''m getting... /Unknown column ''orderdate'' in
2008 Feb 07
1
ActiveRecord 'find_or_initialize_by' dynamic finder bug? Ignoring conditions.
...:conditions passed to them? The documentation seems to indicate that they should. http://api.rubyonrails.org/classes/ActiveRecord/Base.html Dynamic attribute-based finders "It''s even possible to use all the additional parameters to find. For example, the full interface for Payment.find_all_by_amount is actually Payment.find_all_by_amount(amount, options). And the full interface to Person.find_by_user_name is actually Person.find_by_user_name(user_name, options). So you could call Payment.find_all_by_amount(50, :order => "created_on"). The same dynamic finder style can be used to c...
2008 Feb 08
4
x-post : find_or_initialize_by ActiveRecord bug? Ignores :conditions
...assed to them? The documentation seems to indicate that they should. http://api.rubyonrails.org/classes/ActiveRecord/Base.html Dynamic attribute-based finders documentation "It''s even possible to use all the additional parameters to find. For example, the full interface for Payment.find_all_by_amount is actually Payment.find_all_by_amount(amount, options). And the full interface to Person.find_by_user_name is actually Person.find_by_user_name(user_name, options). So you could call Payment.find_all_by_amount(50, :order => "created_on"). The same dynamic finder style can be used to c...