I'm attempting to define a custom composition for a boolean column but
it's causing an exception.

class Site < Sequel::Model
  many_to_one :users
  plugin :composition
  composition :enabled?, :mapping=>[:enabled]
  ...
end

NameError - Site is not a valid constant name!:
        
/Users/jdixon/.rvm/gems/ruby-1.9.2-p180/gems/sequel-3.29.0/lib/sequel/model/inflections.rb:124:in
 `constantize'
        
/Users/jdixon/.rvm/gems/ruby-1.9.2-p180/gems/sequel-3.29.0/lib/sequel/plugins/composition.rb:68:in
 `block in composition'
        
/Users/jdixon/.rvm/gems/ruby-1.9.2-p180/gems/sequel-3.29.0/lib/sequel/plugins/composition.rb:71:in
 `call'
        
/Users/jdixon/.rvm/gems/ruby-1.9.2-p180/gems/sequel-3.29.0/lib/sequel/plugins/composition.rb:71:in
 `block in composition'
        
/Users/jdixon/.rvm/gems/ruby-1.9.2-p180/gems/sequel-3.29.0/lib/sequel/plugins/composition.rb:107:in
 `instance_eval'
        
/Users/jdixon/.rvm/gems/ruby-1.9.2-p180/gems/sequel-3.29.0/lib/sequel/plugins/composition.rb:107:in
 `block (2 levels) in define_composition_accessor'
        /Users/jdixon/Projects/vellup/api.rb:95:in `block in <class:API>'
...

Am I using this plugin incorrectly?

Thanks,

-- 
Jason Dixon
DixonGroup Consulting
http://www.dixongroup.net/

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" 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/sequel-talk?hl=en.

Reply via email to