Organizing a lot of models that use STI in rails
I have a scenario where I am going to be creating a large number of models that use STI and I'm wondering what the best way to organize this is. I already have othe开发者_C百科r models using STI and I really do not want to add any more files to my models folder. Is there any way to create a folder and add the models using STI there (there could be upwards of 40 b/c each uses its own methods to scrape a different site, but they all save the same data)? This seems like it would be best, or I could add them all to one file but I would rather separate them.
Adding a new directory is fine. Make sure you add it to the load paths in environment.rb
, though.
精彩评论