require 'rubygems'
require 'dm-core'
# See issue 8 for why I'm doing this
require 'extlib/inflection'
module ActiveSupport
Inflector = ::Extlib::Inflection
end
require 'dm-is-remixable'
module Test
module Foo
include DataMapper::Resource
is :remixable
property :id, Serial
end
class WorkingFoo
include DataMapper::Resource
property :id, Serial
property :bar_id, Integer
end
class Bar
include DataMapper::Resource
property :id, Serial
has n, :working_foos # Works
remix n, :foos # Doesn't work
end
end
I get:
NameError: uninitialized constant Foo
from dm-core-1.0.2/lib/dm-core/core_ext/object.rb:13:in full_const_get' from dm-core-1.0.2/lib/dm-core/core_ext/object.rb:10:ineach'
from dm-core-1.0.2/lib/dm-core/core_ext/object.rb:10:in full_const_get' from dm-is-remixable-1.0.2/lib/dm-is-remixable/is/remixable.rb:160:inremix'
It might actually be a bug in dm-core, I guess (since we're using full_const_get) - but the has n, :working_foos doesn't raise in the same manner.
Here's a simple testcase:
I get: NameError: uninitialized constant Foo from dm-core-1.0.2/lib/dm-core/core_ext/object.rb:13:in
full_const_get' from dm-core-1.0.2/lib/dm-core/core_ext/object.rb:10:in
each' from dm-core-1.0.2/lib/dm-core/core_ext/object.rb:10:infull_const_get' from dm-is-remixable-1.0.2/lib/dm-is-remixable/is/remixable.rb:160:in
remix'It might actually be a bug in dm-core, I guess (since we're using full_const_get) - but the has n, :working_foos doesn't raise in the same manner.