Hello, I have module with sequel classes:
module CloudPbx
class Customer < Sequel::Model(:cloud_pbx_customers)
one_to_many :users, class: 'CloudPbx::User'
end
class CloudPbx::User < Sequel::Model(:cloud_pbx_users)
many_to_one :customer, class: 'CloudPbx::Customer'
end
end
And getting following error, does anyone know how to fix it?
2.1.2 (main):0 > u = CloudPbx::User.last
D, [2014-09-16T22:38:00.863524 #98615] DEBUG -- : (0.000429s) SELECT * FROM
`cloud_pbx_users` ORDER BY `id` DESC LIMIT 1
=> #<CloudPbx::User:0x007fc56dfaead0> {
:confirmation_sent_at => nil,
....
}
2.1.2 (main):0 > u.customer
NameError: uninitialized constant User
from
/usr/local/rvm/gems/ruby-2.1.2/gems/activesupport-4.0.10/lib/active_support/inflector/methods.rb:226:in
`const_get'
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.