class User < ActiveRecord::Base
has_many :todo_lists do
def active
@active ||= find_all_by_completed(false)
end
def complete
@complete ||= find_all_by_completed(true)
end
end
end
|
class User < ActiveRecord::Base
has_many :todo_lists do
def active
@active ||= find_all_by_completed(false)
end
def complete
@complete ||= find_all_by_completed(true)
end
end
end
|