This project is archived and is in readonly mode.
ActiveRecord Fixture class
-
Prem Sichanugrist (sikachu)
- State changed from new to open
- Assigned user set to Prem Sichanugrist (sikachu)
- Importance changed from to Medium
Yes, I'm agree on having
Fixturemodel namespaced underActiveRecordmodule. Would you please provide a patch for it?Thank you
-
Brian Underwood
Thanks! Here's my patch. Since no functionality change I didn't write any tests, but I ran the sqlite3 tests and they all continued to pass? Should I run any others? I also took the changes to the two non-test related files (fixtures.rb and databases.rake) and put them into my install RVM copy of ActiveRecord 3.0.3 and my tests are running now, so that's exciting ;). Let me know if there's anything else that I need to do.
-
Piotr Sarnacki
It's morning here, so maybe my senses are not so sharp, but how Fixture model could possibly conflict with Fixtures (notice the plural form ;)
-
Brian Underwood
The issue isn't that the Fixture class conflicts with the Fixtures class (note 'class', not 'model'). The issue is that I have a Rails application (and other people may as well) with a Fixture model which is conflicting with the Fixture class and which is preventing me from running tests on that Fixture model. The Fixtures class was namespaced because it didn't seem right to namespace one and not the other ;)
-
Piotr Sarnacki
Brian: that means that I should check lighthouse in the evening rather than in the morning. I thought that there is only Fixtures class in rails (I've started testing after factories revolution, so I've never had to do much with it ;).
So +1 on that from me, looks fine.
-
Brian Underwood
Just wanted to check to see what's next to move the ticket forward. ;)
-
Brian Underwood
I actually just noticed that there were some references to the Fixtures class in other parts of Rails than ActiveRecord, so I've made a new patch. I also ran the tests for all of Rails (that took a while :) and all of the tests seem to pass except for two which also seem to be failing in master.
-
Brian Underwood
Hey, just checking in again. Could somebody let me know what's next for this ticket? Thanks!
-
Prem Sichanugrist (sikachu)
- Milestone cleared.
- State changed from open to verified
- Assigned user changed from Prem Sichanugrist (sikachu) to Aaron Patterson
Your patch looks great! I'll assign to Aaron to get your patch in.
Aaron, could you please handle this for me? I don't know that it would break any gem/plugin or not if we're pushing it to 3.0.4. I'll leave it to your consideration if we need to put it in CHANGELOG or something.
Thank you.
-
Piotr Sarnacki
I would not push it to 3.0.4, it's not a bug, just name collision, it should not be included in patch release, especially because it can break any gem/plugin that uses Fixture class.
-
Brian Underwood
That's sad, but I can understand that we don't want to break plugins in a patch release. Does that mean it would go into 3.1? We're probably a ways away from a 3.1 upgrade if the Arel syntax is the required ActiveRecord API. We can patch our Rails 3.0.x gems in our dev/test environments, which is a pain, but way less of a pain than refactoring the Fixture model out of our app ;)
-
Brian Underwood
Sure, rebased my branch and created a new patch with a couple of fixes
-
Brian Underwood
File didn't attach
-
Brian Underwood
Poking this ticket since it's been open for a while and it will probably be harder to apply the patch later. Aaron, could you take a look at this? If you can't apply the patch, I can make it again off of the latest 3.1
-
Jason Roth
Added this issue to github issues:
https://github.com/rails/rails/issues/439-j
-
Jason Noble
I submitted a github pull request: https://github.com/rails/rails/pull/442
