From: laredotornado Date: 2008-08-04T06:48:47+09:00 Subject: Why am I getting "undefined method" error? Hi, I have a model, in which I have defined a method ... class Form < ActiveRecord::Base has_many :form_items validates_associated :form_items ... def self.has_items FormItem.count(:all, :conditions => ["form_id = ?", :id]) end end but when i try and call this method from another class, def new @form = Form.find_by_user_id(session[:user_id]) if (@form == nil) false else @form.has_items end end I'm getting the error below: undefined method `has_items' for # Any ideas? Thanks, - Dave