Kevin Clark
2006-Mar-02 23:12 UTC
Fixture accessors broken for polymorphism, in need of redesign
Ticket 4052 (http://dev.rubyonrails.org/ticket/4052) just came through trac, which introduces the need for a better way to access fixtures. I believe the basic problem is the same as 3935 (http://dev.rubyonrails.org/ticket/3935) in that the accessor method which is constructed by the fixture call can''t infer the class name from the table name. The band-aid in 3935 was to allow you to define the class in a table with set_fixture_class, but it won''t hold for polymorphism. We''re going to need to redesign the fixture accessors. I''ll look at the code ASAP, but does anyone have suggestions on how to go about it? Kev
Kevin Clark
2006-Mar-03 00:13 UTC
Re: Fixture accessors broken for polymorphism, in need of redesign
Never mind. Ticket is invalid. Fixtures don''t hurt yet, lets leave em. Kev On 3/2/06, Kevin Clark <kevin.clark@gmail.com> wrote:> Ticket 4052 (http://dev.rubyonrails.org/ticket/4052) just came through > trac, which introduces the need for a better way to access fixtures. I > believe the basic problem is the same as 3935 > (http://dev.rubyonrails.org/ticket/3935) in that the accessor method > which is constructed by the fixture call can''t infer the class name > from the table name. The band-aid in 3935 was to allow you to define > the class in a table with set_fixture_class, but it won''t hold for > polymorphism. > > We''re going to need to redesign the fixture accessors. > > I''ll look at the code ASAP, but does anyone have suggestions on how to > go about it? > > Kev >