Now you have the opposite problem... You are now calling list as an instance 
method and you have it defined as a class method.

You need to do ONE of the following.

Define it as a class method, and call it as a class method:

def self.list
  code
end

@list = Sale.list

Define it as an instance method and call it as an instance method:

def list
  code
end

@list = Sale.new.list

However, based on what the list method does, it's probably best that you do 
the former and have it be a class method.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/BaQUoI1plSUJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to