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

[ci skip] Update RESTful User Guide #2321

Merged
merged 3 commits into from
Oct 11, 2019

Conversation

MGatner
Copy link
Member

@MGatner MGatner commented Oct 10, 2019

Description
I find myself frequently flipping back and forth to the routes expansion for ResourceController and ResourcePresenter. Presenter is currently misaligned, making it hard to read, and the two code sections are not in the same order.

This PR aligns the code and reorganizes both sections to be in the same general order (CRUD-ish). Additionally I added a comparison table to make it easier to view the routes, methods, and functions all at once.

Note: The reorg and table are two different commits, in case anyone hates my table

Checklist:

  • Securely signed commits
  • n/a Component(s) with PHPdocs
  • n/a Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@jim-parry
Copy link
Contributor

I don't object to the different route ordering, but there should be a sentence below it like "The ordering above is for clarity, whereas the actual order the routes are created in, in RouteCollection, ensures proper route resolution.

The table is a good idea - adds clarity.
The Presenter has one extra method, to provide for prompting to delete. That matches the edit & update "style" there, though it doesn't have an equivalent in the Resource methods.

@MGatner
Copy link
Member Author

MGatner commented Oct 10, 2019

Good point on the ordering - I didn't think to check which order they are actually created. Would you prefer it in the actual order of routing, instead of adding the note? I'm glad to implement either.

@MGatner MGatner requested a review from jim-parry October 11, 2019 14:55
Copy link
Contributor

@jim-parry jim-parry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :)

@MGatner MGatner merged commit 9614c44 into codeigniter4:develop Oct 11, 2019
@MGatner MGatner deleted the guide-restful branch October 11, 2019 15:06
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.

2 participants