3.34 Load by id not returning subclass #460

Closed
aportnov opened this Issue Apr 2, 2012 · 5 comments

Comments

Projects
None yet
2 participants

aportnov commented Apr 2, 2012

Just updated to version 3.34. Looks like with single_table_inheritance plugin using parent class to load model by id Tournament[t_id] is no longer returning a subclass model.
Tournament.find(:id => t_id) still works as before returning instance of subclass.

Owner

jeremyevans commented Apr 2, 2012

Hmm, this must be caused by by the primary key optimization. I'll look into it right away.

Owner

jeremyevans commented Apr 2, 2012

Confirmed. I'm testing a fix, and will release 3.34.1 after the fix is tested.

aportnov commented Apr 2, 2012

Thanks Jeremy. Let me know if I can help in any way

Owner

jeremyevans commented Apr 2, 2012

Fixed: 0134c29

I'll be releasing a 3.34.1 gem shortly with this bugfix.

Owner

jeremyevans commented Apr 2, 2012

3.34.1 gem released.

Sorry about that. Unfortunately, none of the specs caught this.

jeremyevans closed this Apr 2, 2012

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