fixture_builder
fixture_builder copied to clipboard
Simplify fixture generation and add customization hooks
@rdy putting this out there to get your thoughts on it. We've been using this and it's been really handy for a couple custom things. Lmk what you think and I can add some tests if it seems OK.
- Always use ActiveRecord instead of only when we happen to be able to constantize the name.
- Add select_scope_proc for custom record selection
- Add hashize_record_proc for custom serialization
- Use attributes_before_type_cast
Let me look this over, I've been a little busy this week but I will make it a priority. I plan on fixing the Travis build issues first.
Please rebase the branch of master to fix the Travis issues
@rdy I've rebased and the tests are now green. Let me know what you think in general and if it seems OK I can add tests to cover the new functionality.
@rdy ping :)
I'll try to merge this by the weekend. If you don't mind adding tests for the new functionality I would be more inclined to merge the request quickly.
Super! I'll add some tests in the next few days and then ping you for a merge. I just wanted to make sure you were OK with the idea before I spent the extra effort. Thanks!
@jordan-brough If you add tests, we can look at testing and merging this.