#515 ✓resolved
Leonardo Frittelli

Virtual boolean field - uninitialized constant Hobo::Boolean::COLUMN_TYPE

Reported by Leonardo Frittelli | October 26th, 2009 @ 06:58 AM | in Hobo 1.0 - Final

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:incan_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?

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages