Iain_A
1
Hi,
I seem to be getting errors on a find method call that I dont
understand.
I have the model
class Client < User
has_many :campaigns
has_many :codes, :through=>:campaigns
has_many :code_hit_totals, :through=>:codes
and I am trying the code
cnt =
client.code_hit_totals.find(:all, :conditions=>[“code_hit_totals.month
= ? AND code_hit_totals.year = ?”, date.month, date.year])
However If I get each code_hit_total they are all there.
i.e client.code_hit_totals.each do |cht|
puts cht.inspect
end
Iain_A
2
I never mentioned the error I get. It looks like this
wrong number of arguments (2 for 1)
points to
app/models/report.rb:179:in `find’
Iain_A
3
On 8/6/07, Iain A. [email protected] wrote:
I never mentioned the error I get. It looks like this
wrong number of arguments (2 for 1)
points to
app/models/report.rb:179:in `find’
And what’s line 179 look like?
–
Rick O.
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com