I've been working on some legacy code which has been fun lately, and a lot of the functions are like get_something_one_way in one model, then another model will be like find_something_the_same_way - for instance get_store_by_slug, and find_product_by_slug -- this annoys the crap out of me... use find or get and standardize functions..everything should have a standard to make it easier to know what you're looking for.. I like to use find --when I'm querying the database, and get when I'm querying an external API or when I'm proxying an api from a model.
Comments
I've been working on some legacy code which has been fun lately, and a lot of the functions are like get_something_one_way in one model, then another model will be like find_something_the_same_way - for instance get_store_by_slug, and find_product_by_slug -- this annoys the crap out of me... use find or get and standardize functions..everything should have a standard to make it easier to know what you're looking for.. I like to use find --when I'm querying the database, and get when I'm querying an external API or when I'm proxying an api from a model.