Why am I getting the error "undefined local variable or method `assigns'"?
- by Jason
I might be missing something basic here, but I'm stumped on this error:
model code:
class CachedStat < ActiveRecord::Base
def self.create_stats_days_ago(days_ago, human_id)
d = Date.today - days_ago.day
@prs = PageRequest.find(:all, :conditions => [ "owner_type = 'Human' and owner_id = ? and created_at = ?", human_id, d] )
end…