I've got part of a solution here. It doesn't explicitly setup mapping from 
columns, I've left that to however the end user implements find_sti_class. 
My changes just move find_sti_class from private to protected, and I also 
changed subclass_from_attributes to use that while still preserving the old 
behaviour.

I'm not super happy with it but it does seem to work. Feedback would be 
appreciated!


On Friday, July 11, 2014 12:37:57 AM UTC-4, Andrew White wrote:
>
> On Thursday, 10 July 2014 16:34:05 UTC+1, Eric Roberts wrote:
>
>> So, after all of that, I guess what I'm after is finding out if doing 
>> such a thing is possible in Rails as is. If not, would a patch to make it 
>> possible be desired by people other than myself? And if that patch made 
>> find_sti_class part of the public interface, would that be likely to be 
>> accepted?
>>
>
> If it could be written so that there's a single method to overwrite to 
> provide a custom mapping from column value to class and it had no impact on 
> performance then it should stand a pretty good chance.
>
>
> Andrew White
> Rails Core Team Member 
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to