-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix STI for fixtures from multi-files #18512
Conversation
vipulnsward
commented
Jan 14, 2015
- Add check for not deleting previously created fixtures, to overcome sti fixtures from multiple files
- Added fixtures and fixtures test to verify the same
Tests related to random named files are failing due to unique constraints. |
assert_equal pirates(:blackbeard), dead_parrots(:deadbird).killer | ||
end | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You added 2 spaces here, it should only be one 😄
- Add check for not deleting previously created fixtures, to overcome sti fixtures from multiple files - Added fixtures and fixtures test to verify the same - Fixed wrong fixtures duplicating data insertion in same table
5578b14
to
4ae59eb
Compare
Fixed spacing, also fixed random named fixture test, to not conflict data in a single table. |
unless deleted_tables.include? table | ||
conn.delete "DELETE FROM #{conn.quote_table_name(table)}", 'Fixture Delete' | ||
end | ||
deleted_tables << table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this line be inside the unless
block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either of the way works fine
Fix STI for fixtures from multi-files
Fix STI for fixtures from multi-files
…h-sti" This reverts commit 6a25fd1. Reverting this as I thought it was a bug fix, but actually it is not. This is more like a feature addition, as you can have STI for fixtures right now if you have one fixture file for that table.