search for: scholarship_application

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

2010 Aug 10
4
(Dreaded) STI, belongs_to
...lication instance to tell me its StateMachine, but the StateMachine 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 m...