Open kleintom opened 5 months ago
The #### Controller specs
section seems to imply that scaffolding generates a controller spec, but I'm not seeing that even with just the basic bin/rails generate scaffold Lead parent_id:integer otu_id:integer text:text origin_label:string description:text redirect_id:integer link_out:text link_out_text:string position:integer is_public:boolean project_id:integer created_by_id:integer:index updated_by_id:integer:index -p
. I'll update the doc once I've gone through the rest of it as well.
Ah, looks like controller spec generation was removed in rails 5, cf. https://stackoverflow.com/a/66344093 Do we still want to include a controller spec with new models (might require creating one from scratch or copying an existing one), or switch to a request spec as recommended/generated, or something else?
Controller specs are indeed minimally useful (that's why they were removed by default). IIRC we were copying existing specs. The existing pattern used in other models does re-inforce gatting some things setup (valid_lead
factories for example in this case), however I'm happy to leave them out moving forward, and use this as a test case to see what type of impacts that proceedural change might raise.
I added some more content from https://github.com/SpeciesFileGroup/taxonworks_doc/blob/40aef883d5d29ece2e736891fea3ef79fbbc6670/development/HOW-TO.md and added a section on radial annotators and navigators, see if it seems useful (and accurate...). I didn't include the sections with which I have no experience. As always, please feel free to edit or remove anything I've written, or ask me to, I'd be glad to.
So far I've only personally worked through the instructions up through the Model section.