Hi there,

Why do I get 'true' when:
- I call: @agency.all_agents_done? and
- @gency has at least 3 Agents


The Agency model is:
====================

  class Agency < ActiveRecord::Base
    has_many :agents

    def all_agents_done?     # (don't look for any real sense in this
method...)
      i=0
      self.agents do |agent| # (@gency has at least 3 Agents...)
        i=i+1 if (1 == 1)
      end

      if i == 0
        true
      else
        false
      end
    end
  end



Thanks for any hint!
Tom
-- 
Posted via http://www.ruby-forum.com/.