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

Refine CRUD templates #935

Merged
merged 1 commit into from
May 3, 2024
Merged

Refine CRUD templates #935

merged 1 commit into from
May 3, 2024

Conversation

zw963
Copy link
Contributor

@zw963 zw963 commented Mar 30, 2023

  1. links use non keyword argument form.
  2. Remove unnecessary namespaces.

@jwoertink
Copy link
Member

I think the namespaces are actually better to have. These help reduce ambiguity when glancing over code, as well as help searching when doing grep across an entire project. It's easier to search for Posts::Index than it is Index. Since it's all generated code, I feel it's ok to be a little extra verbose here.

@zw963
Copy link
Contributor Author

zw963 commented Apr 10, 2023

I think the namespaces are actually better to have. These help reduce ambiguity when glancing over code, as well as help searching when doing grep across an entire project. It's easier to search for Posts::Index than it is Index. Since it's all generated code, I feel it's ok to be a little extra verbose here.

Okay, done.

@zw963
Copy link
Contributor Author

zw963 commented May 3, 2024

Wow, this PR not review again since a year ago?

link "New <%= resource %>", to: <%= pluralized_name %>::New
link "New <%= resource %>", <%= pluralized_name %>::New
Copy link
Member

Choose a reason for hiding this comment

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

I personally prefer there to be the to:. I always add it in my projects. But since line 15 is defined without it, I guess we can do this. Or we need to update line 15 to include the to: just so they both match.

@jwoertink
Copy link
Member

Sorry, I just forgot to come back to this. It looks like it's behind now though, so it either needs to be updated or closed out.

@zw963
Copy link
Contributor Author

zw963 commented May 3, 2024

Sorry, i push forcefully.

i add to: to all template, please check.

Copy link
Member

@jwoertink jwoertink left a comment

Choose a reason for hiding this comment

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

I like this change 🙌 It's very clear and consistent. Thank you for adding this.

@jwoertink jwoertink merged commit bc2ad7b into luckyframework:main May 3, 2024
8 of 9 checks passed
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