search for: scholarship_applications

Displaying 1 result from an estimated 1 matches for "scholarship_applications".

2010 Aug 10
4
(Dreaded) STI, belongs_to
...achine can''t tell me it''s ScholarshipApplication. E.g.: app = ScholarshipApplication.create state = StateA.create app.state_machine = state app.save app.state_machine # returns what it should sm = app.state_machine sm.scholarship_application # throws error: "Unknown column scholarship_applications.state_a_id..." So obviously I understand why this fails, since I don''t have a state_a_id column in scholarship_applications. I just don''t understand whether what I''m doing is achievable and if so, what magic configuration makes it all work. E.g. should my has_one...