Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Assocations dont't searches constants in same scope they are defined #298

Closed
jeremyevans opened this Issue · 3 comments

1 participant

Jeremy Evans
Jeremy Evans
Owner

What steps will reproduce the problem?
See minimal example in patchfile

What is the expected output? What do you see instead?
See error in patchfile

What version of the product are you using? On what operating system?
sequel - Trunk
debian - lenny

Please provide any additional information below.
Sorry for short description but I think the patch should explain everything.

Google Code Info:
Issue #: 274
Author: nou...@googlemail.com
Created On: 2009-07-11T15:21:44.000Z
Closed On: 2009-07-13T15:22:51.000Z

Jeremy Evans
Owner

This isn't a bug, this is how Sequel was designed. If you are using models inside
modules, all associations need to include a :class or :class_name option specifying
the full class name (including modules).

That being said, while this is a slight breakage of backwards compatibility, I think
it makes sense. I'll use your patch as a starting point.

Google Code Info:
Author: jeremyev...@gmail.com
Created On: 2009-07-11T17:33:42.000Z

Jeremy Evans
Owner

Here's a preliminary patch: http://pastie.org/542498

I haven't run it through my full test suite yet, but after I do I'll be committing it.

Google Code Info:
Author: jeremyev...@gmail.com
Created On: 2009-07-11T18:33:23.000Z

Jeremy Evans
Owner

Fixed:
http://github.com/jeremyevans/sequel/commit/0ebe58ed686bd44273409b6c429c2d8c56f0f352
http://github.com/jeremyevans/sequel/commit/a0d069d0791608c5e68811c99a6595824b3c9a07

Basically the same as the original patch, but with the second patch to support
anonymous classes on ruby 1.9.

Google Code Info:
Author: jeremyev...@gmail.com
Created On: 2009-07-13T15:22:51.000Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.