In #1097, we refer to the new_resource method which is useful when building out new records in a controller. But it isn't referenced anywhere.
We might like to answer:
It'd be best if we added it to a "Customising Administrate" or "Internals" section, or similar.
There are a few hooks in Administrate::ApplicationController that we don't document. Currently, the page Customizing controller actions is the closer we have, I think. This in turn is an outdated version of the directions included with automatically generated controllers: https://github.com/thoughtbot/administrate/blob/master/lib/generators/administrate/dashboard/templates/controller.rb.erb
I think we have two problems regarding documentation of our APIs:
An idea would be:
I think that would ease the three problems I list above. What do you think?
Yeah, I agree with that. I've generally been a fan of YARD but I don't have very strong opinions on it.
It's been very long since I used any of these tools, so I don't know the difference. Whichever is good for me!
FYI a description of how the Rails documentation is generated: https://discuss.rubyonrails.org/t/api-rubyonrails-org-sidebar-rendering/74644/5
I'm now realising I said "whichever is good for me", and I meant "whichever is good for you works for me", or something like that :sweat_smile:
Most helpful comment
There are a few hooks in
Administrate::ApplicationControllerthat we don't document. Currently, the page Customizing controller actions is the closer we have, I think. This in turn is an outdated version of the directions included with automatically generated controllers: https://github.com/thoughtbot/administrate/blob/master/lib/generators/administrate/dashboard/templates/controller.rb.erbI think we have two problems regarding documentation of our APIs:
An idea would be:
I think that would ease the three problems I list above. What do you think?