[Nitro] has_one fails with preceding property

itsme213 itsme213 at hotmail.com
Fri Jun 30 18:27:20 EDT 2006


class A
  has_one :b, B
end

will fail: /src/domains.rb:31: undefined method `has_one' for Slot:Class 
(NoMethodError)
       from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in 
`require__'
       from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in 
`require'
       from run.rb:7

while

class A
  property :x, String
  has_one :b, B
end

will succeed.

What is the thinking behind this? I am sure there is some other explicit 
declaration I can make so that first version works, but this I find this 
kind of magic inconsistent and confusing.

Thanks for any light shed.






More information about the Nitro-general mailing list