
has_many_to_many and models inside modules
Reported by Alexander Flatter | July 22nd, 2008 @ 09:26 PM
class Billing::Client
# ...
has n, :clients, :through => Resource
end
class Billing::Contact
# ...
has n, :contacts, :through => Resource
end
Results in:
/Library/Ruby/Gems/1.8/gems/dm-core-0.9.3/lib/dm-core/associations/one_to_many.rb:18:in `setup': compile error (SyntaxError)
/Library/Ruby/Gems/1.8/gems/dm-core-0.9.3/lib/dm-core/associations/one_to_many.rb:16: syntax error, unexpected '/', expecting '\n' or ';'
def billing/client_contacts(query = {})
^
/Library/Ruby/Gems/1.8/gems/dm-core-0.9.3/lib/dm-core/associations/one_to_many.rb:18: syntax error, unexpected kEND, expecting $end from /Library/Ruby/Gems/1.8/gems/dm-core-0.9.3/lib/dm-core/associations.rb:121:in `has'
from /Library/Ruby/Gems/1.8/gems/dm-core-0.9.3/lib/dm-core/associations/many_to_many.rb:56:in `setup'
from /Library/Ruby/Gems/1.8/gems/dm-core-0.9.3/lib/dm-core/associations.rb:121:in `has'
Comments and changes to this ticket
-
Jonathan Stott (namelessjon) November 30th, 2008 @ 09:19 AM
- Assigned user cleared.
- Milestone cleared.
- State changed from new to open
Currently this will work, as long as the
:class_name
option is used, but ideally it wouldn't be needed for classes in the same module -
Dan Kubb (dkubb) January 8th, 2009 @ 04:42 AM
- State changed from open to accepted
- Assigned user set to Dan Kubb (dkubb)
-
Dan Kubb (dkubb) February 21st, 2009 @ 04:03 AM
- State changed from accepted to resolved
I can confirm this is fixed in the dm-core/next branch.
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »