Dear Hobo community,

I have added a virtual boolean field to my model (as described in
http://cookbook.hobocentral.net/manual/hobofields/hobofields_api) but
I am getting an error when assigning values to my field.

Here is my test code:

class MyBooleanTest < ActiveRecord::Base
  hobo_model

  attr_accessor :test, :type => :boolean
end

t=MyBooleanTest.new
t.test = true

The error is
NameError: uninitialized constant Hobo::Boolean::COLUMN_TYPE
        from 
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:105:in
`const_missing'
        from 
/usr/lib/ruby/gems/1.8/gems/hobofields-0.8.10/lib/hobo_fields.rb:66:in
`can_wrap?'
        from 
/usr/lib/ruby/gems/1.8/gems/hobofields-0.8.10/lib/hobo_fields/model_extensions.rb:56:in
`test='
        from (irb):58

in hobo_fields.rb, Boolean class is defined as "class Boolean; end" so
it clearly does not declare a COLUMN_TYPE, as expected in can_wrap?

Am I using the API incorrectly or is this a bug in hobo_fields?

Thanks,

Leo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
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/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to