Association, class_name option: why a String? #6486

Closed
kuraga opened this Issue May 25, 2012 · 2 comments

Comments

Projects
None yet
3 participants

kuraga commented May 25, 2012

Why class_name option of association method have to be a String not a Class?

Contributor

alexeymuranov commented May 25, 2012

It can be also a symbol. It cannot be a class constant because if you have two associated models, when the first is being loaded, the second is not yet defined, so the constant would not be defined, and this would give an error.

Please use mailing lists or stackoverflow for questions, and github issues for real issues. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment