I’ve been working with rails for a couple of months now. And I was
getting pretty confident and feeling pretty good about how i was
proceeding. Every once in a while though, I try and do something that
keeps me humble, and reminds me that I’m still just a newbie.
Why doesn’t this work in my model:
def self.complete_task(tid, uid)
@taskhist = taskhist.new
@taskhist.task_id = gid
@taskhist.entity_id = uid
@taskhist.timeperiod_id = 7
@taskhist.task_meas = Taskhist.find(:first, :conditions => “task_id
@taskhist.taskhisttype_id = 3
when I try and call from the console or from my controller. For some
reason, I get an argument 1 for 2 error. Can model methods only take 1
parameter in rails? If that’s the case, what’s my work around?
Thanks so much in advance!