Skip to content
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

Add some developer coding notes #85

Open
wants to merge 16 commits into
base: development
Choose a base branch
from

Conversation

kleintom
Copy link
Contributor

So far I've only personally worked through the instructions up through the Model section.

@kleintom
Copy link
Contributor Author

kleintom commented Feb 1, 2024

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.

@kleintom kleintom marked this pull request as draft February 1, 2024 16:43
@kleintom
Copy link
Contributor Author

kleintom commented Feb 1, 2024

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?

@mjy
Copy link
Member

mjy commented Feb 1, 2024

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.

@kleintom kleintom changed the title Code generate model Add some developer coding notes Feb 29, 2024
@kleintom
Copy link
Contributor Author

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.

@kleintom kleintom marked this pull request as ready for review February 29, 2024 14:47
…erate

I'm not sure using these commands would be any faster than doing it by hand at this point, probably need a better solution.
It was illustrative to me on several points, but is probably more technical than what these notes are intended for.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants