On Friday, September 21, 2012 12:09:23 PM UTC-4, Gary Weaver wrote:
> That isn't efficient and still doesn't help, but if you took that yet > another step further, you could change autoloading such that it keeps track > of whether the class was loaded locally or not, and if it was, it would use > your Journey class, otherwise it would use some other gem's Journey. You > could generify the gem and call it StevePerry or maybe just Perry. Hmm.. > might do that later. > > Ok, this is not done/working yet, but is a start. Was thinking that maybe looking at caller stack might be better to attempt to determine whether class is being referenced locally, so not messing with autoload. However, I have a feeling this won't work unless the Journey constant is uncached on each reference. My daughter is extremely bored waiting on me currently, so gotta run for now: https://github.com/garysweaver/constance -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/xrA6pNSuByYJ. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.